(fp);
- return d(a1, a2, a3);
- }
-#else
- private static AssemblyBuilder aBuilder;
- private static ModuleBuilder mBuilder;
-
- public static INativeCall Impl;
-
- static NativeCall()
- {
- // The static constructor is responsible for generating the
- // assembly and the methods that implement the IJW thunks.
- //
- // To do this, we actually use reflection on the INativeCall
- // interface (defined below) and generate the required thunk
- // code based on the method signatures.
-
- var aname = new AssemblyName { Name = "e__NativeCall_Assembly" };
- var aa = AssemblyBuilderAccess.Run;
-
- aBuilder = Thread.GetDomain().DefineDynamicAssembly(aname, aa);
- mBuilder = aBuilder.DefineDynamicModule("e__NativeCall_Module");
-
- var ta = TypeAttributes.Public;
- TypeBuilder tBuilder = mBuilder.DefineType("e__NativeCall", ta);
-
- Type iType = typeof(INativeCall);
- tBuilder.AddInterfaceImplementation(iType);
-
- // Use reflection to loop over the INativeCall interface methods,
- // calling GenerateThunk to create a managed thunk for each one.
-
- foreach (MethodInfo method in iType.GetMethods())
- {
- GenerateThunk(tBuilder, method);
- }
-
- Type theType = tBuilder.CreateType();
-
- Impl = (INativeCall)Activator.CreateInstance(theType);
- }
-
- private static void GenerateThunk(TypeBuilder tb, MethodInfo method)
- {
- ParameterInfo[] pi = method.GetParameters();
- int count = pi.Length;
- int argc = count - 1;
-
- var args = new Type[count];
- for (var i = 0; i < count; i++)
- {
- args[i] = pi[i].ParameterType;
- }
-
- MethodBuilder mb = tb.DefineMethod(
- method.Name,
- MethodAttributes.Public |
- MethodAttributes.Virtual,
- method.ReturnType,
- args
- );
-
- // Build the method signature for the actual native function.
- // This is essentially the signature of the wrapper method
- // minus the first argument (the passed in function pointer).
-
- var nargs = new Type[argc];
- for (var i = 1; i < count; i++)
- {
- nargs[i - 1] = args[i];
- }
-
- // IL generation: the (implicit) first argument of the method
- // is the 'this' pointer and the second is the function pointer.
- // This code pushes the real args onto the stack, followed by
- // the function pointer, then the calli opcode to make the call.
-
- ILGenerator il = mb.GetILGenerator();
-
- for (var i = 0; i < argc; i++)
- {
- il.Emit(OpCodes.Ldarg_S, i + 2);
- }
-
- il.Emit(OpCodes.Ldarg_1);
-
- il.EmitCalli(OpCodes.Calli,
- CallingConvention.Cdecl,
- method.ReturnType,
- nargs
- );
-
- il.Emit(OpCodes.Ret);
-
- tb.DefineMethodOverride(mb, method);
- }
-
-
- public static void Void_Call_1(IntPtr fp, IntPtr a1)
- {
- Impl.Void_Call_1(fp, a1);
- }
-
- public static IntPtr Call_3(IntPtr fp, IntPtr a1, IntPtr a2, IntPtr a3)
- {
- return Impl.Call_3(fp, a1, a2, a3);
- }
-
- public static int Int_Call_3(IntPtr fp, IntPtr a1, IntPtr a2, IntPtr a3)
- {
- return Impl.Int_Call_3(fp, a1, a2, a3);
- }
-#endif
- }
-
-#if !NETSTANDARD
- ///
- /// Defines native call signatures to be generated by NativeCall.
- ///
- public interface INativeCall
- {
- void Void_Call_0(IntPtr funcPtr);
-
- void Void_Call_1(IntPtr funcPtr, IntPtr arg1);
-
- int Int_Call_3(IntPtr funcPtr, IntPtr t, IntPtr n, IntPtr v);
-
- IntPtr Call_3(IntPtr funcPtr, IntPtr a1, IntPtr a2, IntPtr a3);
- }
-#endif
-}
diff --git a/src/testing/Python.Test.15.csproj b/src/testing/Python.Test.15.csproj
deleted file mode 100644
index 8c23fe4b5..000000000
--- a/src/testing/Python.Test.15.csproj
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
- net40;netstandard2.0
- x64;x86
- DebugMono;DebugMonoPY3;ReleaseMono;ReleaseMonoPY3;DebugWin;DebugWinPY3;ReleaseWin;ReleaseWinPY3
- Python.Test
- Python.Test
- Python.Test
- 2.4.1
- bin\
- false
- $(OutputPath)\$(AssemblyName).xml
- $(OutputPath)\$(TargetFramework)\$(AssemblyName).xml
- 1591,0067
- ..\..\
- $(SolutionDir)\bin\
- $(PythonBuildDir)\$(TargetFramework)\
- 6
- false
- ..\pythonnet.snk
- prompt
- $(PYTHONNET_DEFINE_CONSTANTS)
- XPLAT
- $(DefineConstants);$(CustomDefineConstants);$(BaseDefineConstants);
- $(DefineConstants);TRACE;DEBUG
- $(NuGetPackageRoot)\microsoft.targetingpack.netframework.v4.5\1.0.1\lib\net45\
-
-
- x86
-
-
- x64
-
-
-
- false
- full
-
-
- true
- pdbonly
-
-
- true
- false
- full
-
-
- true
- true
- portable
-
-
-
- $(DefineConstants);DEBUG;TRACE
-
-
- $(DefineConstants)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(TargetPath)
- $(TargetDir)$(TargetName).pdb
-
-
-
-
-
-
-
diff --git a/src/testing/Python.Test.csproj b/src/testing/Python.Test.csproj
deleted file mode 100644
index 6bf5c2d22..000000000
--- a/src/testing/Python.Test.csproj
+++ /dev/null
@@ -1,115 +0,0 @@
-
-
-
- Debug
- AnyCPU
- {6F401A34-273B-450F-9A4C-13550BE0767B}
- Library
- Python.Test
- Python.Test
- bin\Python.Test.xml
- bin\
- v4.0
-
- 1591,0067
- ..\..\
- $(SolutionDir)\bin\
- 6
- false
- ..\pythonnet.snk
- prompt
-
-
- x86
-
-
- x64
-
-
- true
- DEBUG;TRACE
- full
-
-
-
-
- true
- pdbonly
-
-
- true
- DEBUG;TRACE
- full
-
-
-
-
- true
- pdbonly
-
-
- true
- DEBUG;TRACE
- full
-
-
-
-
- true
- pdbonly
-
-
- true
- DEBUG;TRACE
- full
-
-
-
-
- true
- pdbonly
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {097B4AC0-74E9-4C58-BCF8-C69746EC8271}
- Python.Runtime
-
-
-
-
- $(TargetPath)
- $(TargetDir)$(TargetName).pdb
-
-
-
-
-
-
diff --git a/src/tests/__init__.py b/tests/__init__.py
similarity index 100%
rename from src/tests/__init__.py
rename to tests/__init__.py
diff --git a/src/tests/_compat.py b/tests/_compat.py
similarity index 100%
rename from src/tests/_compat.py
rename to tests/_compat.py
diff --git a/src/tests/_missing_import.py b/tests/_missing_import.py
similarity index 100%
rename from src/tests/_missing_import.py
rename to tests/_missing_import.py
diff --git a/src/tests/conftest.py b/tests/conftest.py
similarity index 100%
rename from src/tests/conftest.py
rename to tests/conftest.py
diff --git a/src/tests/fixtures/.gitkeep b/tests/fixtures/.gitkeep
similarity index 100%
rename from src/tests/fixtures/.gitkeep
rename to tests/fixtures/.gitkeep
diff --git a/src/tests/fixtures/argv-fixture.py b/tests/fixtures/argv-fixture.py
similarity index 100%
rename from src/tests/fixtures/argv-fixture.py
rename to tests/fixtures/argv-fixture.py
diff --git a/src/tests/fixtures/netstandard2.0/.gitkeep b/tests/fixtures/netstandard2.0/.gitkeep
similarity index 100%
rename from src/tests/fixtures/netstandard2.0/.gitkeep
rename to tests/fixtures/netstandard2.0/.gitkeep
diff --git a/src/tests/importtest.py b/tests/importtest.py
similarity index 100%
rename from src/tests/importtest.py
rename to tests/importtest.py
diff --git a/src/tests/leaktest.py b/tests/leaktest.py
similarity index 100%
rename from src/tests/leaktest.py
rename to tests/leaktest.py
diff --git a/src/tests/profile.py b/tests/profile.py
similarity index 100%
rename from src/tests/profile.py
rename to tests/profile.py
diff --git a/src/tests/runtests.py b/tests/runtests.py
similarity index 100%
rename from src/tests/runtests.py
rename to tests/runtests.py
diff --git a/src/tests/stress.py b/tests/stress.py
similarity index 100%
rename from src/tests/stress.py
rename to tests/stress.py
diff --git a/src/tests/stresstest.py b/tests/stresstest.py
similarity index 100%
rename from src/tests/stresstest.py
rename to tests/stresstest.py
diff --git a/src/tests/test_array.py b/tests/test_array.py
similarity index 100%
rename from src/tests/test_array.py
rename to tests/test_array.py
diff --git a/src/tests/test_callback.py b/tests/test_callback.py
similarity index 100%
rename from src/tests/test_callback.py
rename to tests/test_callback.py
diff --git a/src/tests/test_class.py b/tests/test_class.py
similarity index 100%
rename from src/tests/test_class.py
rename to tests/test_class.py
diff --git a/src/tests/test_clrmethod.py b/tests/test_clrmethod.py
similarity index 100%
rename from src/tests/test_clrmethod.py
rename to tests/test_clrmethod.py
diff --git a/src/tests/test_compat.py b/tests/test_compat.py
similarity index 100%
rename from src/tests/test_compat.py
rename to tests/test_compat.py
diff --git a/src/tests/test_constructors.py b/tests/test_constructors.py
similarity index 100%
rename from src/tests/test_constructors.py
rename to tests/test_constructors.py
diff --git a/src/tests/test_conversion.py b/tests/test_conversion.py
similarity index 100%
rename from src/tests/test_conversion.py
rename to tests/test_conversion.py
diff --git a/src/tests/test_delegate.py b/tests/test_delegate.py
similarity index 100%
rename from src/tests/test_delegate.py
rename to tests/test_delegate.py
diff --git a/src/tests/test_docstring.py b/tests/test_docstring.py
similarity index 100%
rename from src/tests/test_docstring.py
rename to tests/test_docstring.py
diff --git a/src/tests/test_engine.py b/tests/test_engine.py
similarity index 100%
rename from src/tests/test_engine.py
rename to tests/test_engine.py
diff --git a/src/tests/test_enum.py b/tests/test_enum.py
similarity index 100%
rename from src/tests/test_enum.py
rename to tests/test_enum.py
diff --git a/src/tests/test_event.py b/tests/test_event.py
similarity index 100%
rename from src/tests/test_event.py
rename to tests/test_event.py
diff --git a/src/tests/test_exceptions.py b/tests/test_exceptions.py
similarity index 100%
rename from src/tests/test_exceptions.py
rename to tests/test_exceptions.py
diff --git a/src/tests/test_field.py b/tests/test_field.py
similarity index 100%
rename from src/tests/test_field.py
rename to tests/test_field.py
diff --git a/src/tests/test_generic.py b/tests/test_generic.py
similarity index 100%
rename from src/tests/test_generic.py
rename to tests/test_generic.py
diff --git a/src/tests/test_import.py b/tests/test_import.py
similarity index 100%
rename from src/tests/test_import.py
rename to tests/test_import.py
diff --git a/src/tests/test_indexer.py b/tests/test_indexer.py
similarity index 100%
rename from src/tests/test_indexer.py
rename to tests/test_indexer.py
diff --git a/src/tests/test_interface.py b/tests/test_interface.py
similarity index 100%
rename from src/tests/test_interface.py
rename to tests/test_interface.py
diff --git a/src/tests/test_method.py b/tests/test_method.py
similarity index 100%
rename from src/tests/test_method.py
rename to tests/test_method.py
diff --git a/src/tests/test_module.py b/tests/test_module.py
similarity index 100%
rename from src/tests/test_module.py
rename to tests/test_module.py
diff --git a/src/tests/test_property.py b/tests/test_property.py
similarity index 100%
rename from src/tests/test_property.py
rename to tests/test_property.py
diff --git a/src/tests/test_recursive_types.py b/tests/test_recursive_types.py
similarity index 100%
rename from src/tests/test_recursive_types.py
rename to tests/test_recursive_types.py
diff --git a/src/tests/test_repr.py b/tests/test_repr.py
similarity index 100%
rename from src/tests/test_repr.py
rename to tests/test_repr.py
diff --git a/src/tests/test_subclass.py b/tests/test_subclass.py
similarity index 100%
rename from src/tests/test_subclass.py
rename to tests/test_subclass.py
diff --git a/src/tests/test_sysargv.py b/tests/test_sysargv.py
similarity index 100%
rename from src/tests/test_sysargv.py
rename to tests/test_sysargv.py
diff --git a/src/tests/test_thread.py b/tests/test_thread.py
similarity index 100%
rename from src/tests/test_thread.py
rename to tests/test_thread.py
diff --git a/src/tests/tests.pyproj b/tests/tests.pyproj
similarity index 100%
rename from src/tests/tests.pyproj
rename to tests/tests.pyproj
diff --git a/src/tests/utils.py b/tests/utils.py
similarity index 100%
rename from src/tests/utils.py
rename to tests/utils.py
diff --git a/tox.ini b/tox.ini
deleted file mode 100644
index 3c9be5c63..000000000
--- a/tox.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-[tox]
-skip_missing_interpreters=True
-envlist =
- py27
- py33
- py34
- py35
- py36
- py37
- check
-
-[testenv]
-deps =
- pytest
-commands =
- {posargs:py.test}
-
-[testenv:check]
-ignore_errors=True
-skip_install=True
-basepython=python3.5
-deps =
- check-manifest
- flake8
-commands =
- flake8 src setup.py
- python setup.py check --strict --metadata
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy