@@ -205,7 +205,6 @@ internal static void Initialize(bool initSigs = false)
205
205
PyNotImplemented = PyObject_GetAttrString ( op , "NotImplemented" ) ;
206
206
PyBaseObjectType = PyObject_GetAttrString ( op , "object" ) ;
207
207
208
- PyModuleType = PyObject_Type ( op ) ;
209
208
PyNone = PyObject_GetAttrString ( op , "None" ) ;
210
209
PyTrue = PyObject_GetAttrString ( op , "True" ) ;
211
210
PyFalse = PyObject_GetAttrString ( op , "False" ) ;
@@ -302,6 +301,7 @@ internal static void Initialize(bool initSigs = false)
302
301
dllLocal = loader . Load ( _PythonDll ) ;
303
302
}
304
303
_PyObject_NextNotImplemented = loader . GetFunction ( dllLocal , "_PyObject_NextNotImplemented" ) ;
304
+ PyModuleType = loader . GetFunction ( dllLocal , "PyModule_Type" ) ;
305
305
306
306
if ( dllLocal != IntPtr . Zero )
307
307
{
@@ -769,8 +769,10 @@ public static extern int Py_Main(
769
769
[ DllImport ( _PythonDll , CallingConvention = CallingConvention . Cdecl ) ]
770
770
internal static extern IntPtr PyCFunction_Call( IntPtr func , IntPtr args , IntPtr kw ) ;
771
771
772
+ #if PYTHON2
772
773
[ DllImport ( _PythonDll , CallingConvention = CallingConvention . Cdecl ) ]
773
774
internal static extern IntPtr PyClass_New( IntPtr bases , IntPtr dict , IntPtr name ) ;
775
+ #endif
774
776
775
777
[ DllImport ( _PythonDll , CallingConvention = CallingConvention . Cdecl ) ]
776
778
internal static extern IntPtr PyInstance_New( IntPtr cls , IntPtr args , IntPtr kw ) ;
@@ -1012,10 +1014,6 @@ internal static IntPtr PyInt_FromInt64(long value)
1012
1014
[ DllImport( _PythonDll, CallingConvention = CallingConvention. Cdecl,
1013
1015
EntryPoint = "PyLong_FromString") ]
1014
1016
internal static extern IntPtr PyInt_FromString( string value, IntPtr end, int radix) ;
1015
-
1016
- [ DllImport( _PythonDll, CallingConvention = CallingConvention. Cdecl,
1017
- EntryPoint = "PyLong_GetMax") ]
1018
- internal static extern int PyInt_GetMax( ) ;
1019
1017
#elif PYTHON2
1020
1018
[ DllImport( _PythonDll, CallingConvention = CallingConvention. Cdecl) ]
1021
1019
private static extern IntPtr PyInt_FromLong( IntPtr value) ;
0 commit comments