2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-25 03:09:30 +01:00

Merge branch 'swig_pg_1' into 'master'

swig playground: fix build for Python 3.x

See merge request ita1024/waf!2259
This commit is contained in:
ita1024 2019-09-13 22:25:28 +00:00
commit f7cfcce157

View File

@ -3,7 +3,11 @@
extern "C"
{
#if PY_VERSION_HEX >= 0x03000000
void PyInit__swigdemo(void);
#else
void init_swigdemo(void);
#endif
}
TestClass* TestClass::_instance = 0;
@ -11,7 +15,11 @@ TestClass* TestClass::_instance = 0;
int main()
{
Py_Initialize();
#if PY_VERSION_HEX >= 0x03000000
PyInit__swigdemo();
#else
init_swigdemo();
#endif
/*FILE* file_py;
file_py = fopen(i_oFile.toLocal8Bit(), "r");