X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.pythonlink.win32.x86_64%2Fsrc%2Fsclpy.h;fp=org.simantics.pythonlink.win32.x86_64%2Fsrc%2Fsclpy.h;h=58b141addd5832f3203dba337a0a2860d107685e;hb=d556dfd2739c43551c894dd636bf8e0735fbad55;hp=e71e107040475b26a1afba11aa2cf0aa6f07953c;hpb=c8a7033eeec2a8a4dd99a8738a7685e8d51b19fd;p=simantics%2Fpython.git diff --git a/org.simantics.pythonlink.win32.x86_64/src/sclpy.h b/org.simantics.pythonlink.win32.x86_64/src/sclpy.h index e71e107..58b141a 100644 --- a/org.simantics.pythonlink.win32.x86_64/src/sclpy.h +++ b/org.simantics.pythonlink.win32.x86_64/src/sclpy.h @@ -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