]> gerrit.simantics Code Review - simantics/python.git/blobdiff - org.simantics.pythonlink.win32.x86_64/src/sclpy.h
Several updates to Pyhthon-link behaviour.
[simantics/python.git] / org.simantics.pythonlink.win32.x86_64 / src / sclpy.h
index e71e107040475b26a1afba11aa2cf0aa6f07953c..58b141addd5832f3203dba337a0a2860d107685e 100644 (file)
@@ -1,6 +1,13 @@
 #ifndef __MAIN_H__
 #define __MAIN_H__
 
+// Avoid use of the PyRun_StringFlags API to maintain compatibility with python3.dll
+#define Py_LIMITED_API 0x03050000
+
+#define PyTuple_GET_ITEM PyTuple_Get_Item
+#define PyTuple_GET_SIZE PyTuple_Get_Size
+#define PyTuple_SET_ITEM PyTuple_Set_Item
+
 #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
 #ifdef _DEBUG
        #undef _DEBUG