@@ -205,7 +205,6 @@ internal static void Initialize(bool initSigs = false)
205205 PyNotImplemented = PyObject_GetAttrString ( op , "NotImplemented" ) ;
206206 PyBaseObjectType = PyObject_GetAttrString ( op , "object" ) ;
207207
208- PyModuleType = PyObject_Type ( op ) ;
209208 PyNone = PyObject_GetAttrString ( op , "None" ) ;
210209 PyTrue = PyObject_GetAttrString ( op , "True" ) ;
211210 PyFalse = PyObject_GetAttrString ( op , "False" ) ;
@@ -302,6 +301,7 @@ internal static void Initialize(bool initSigs = false)
302301 dllLocal = loader . Load ( _PythonDll ) ;
303302 }
304303 _PyObject_NextNotImplemented = loader . GetFunction ( dllLocal , "_PyObject_NextNotImplemented" ) ;
304+ PyModuleType = loader . GetFunction ( dllLocal , "PyModule_Type" ) ;
305305
306306 if ( dllLocal != IntPtr . Zero )
307307 {
@@ -769,8 +769,10 @@ public static extern int Py_Main(
769769 [ DllImport ( _PythonDll , CallingConvention = CallingConvention . Cdecl ) ]
770770 internal static extern IntPtr PyCFunction_Call( IntPtr func , IntPtr args , IntPtr kw ) ;
771771
772+ #if PYTHON2
772773 [ DllImport ( _PythonDll , CallingConvention = CallingConvention . Cdecl ) ]
773774 internal static extern IntPtr PyClass_New( IntPtr bases , IntPtr dict , IntPtr name ) ;
775+ #endif
774776
775777 [ DllImport ( _PythonDll , CallingConvention = CallingConvention . Cdecl ) ]
776778 internal static extern IntPtr PyInstance_New( IntPtr cls , IntPtr args , IntPtr kw ) ;
@@ -1012,10 +1014,6 @@ internal static IntPtr PyInt_FromInt64(long value)
10121014 [ DllImport( _PythonDll, CallingConvention = CallingConvention. Cdecl,
10131015 EntryPoint = "PyLong_FromString") ]
10141016 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( ) ;
10191017#elif PYTHON2
10201018 [ DllImport( _PythonDll, CallingConvention = CallingConvention. Cdecl) ]
10211019 private static extern IntPtr PyInt_FromLong( IntPtr value) ;
0 commit comments