#ifndef __APPLE__ #define FUNCTION(name) \ .globl name; \ .type name, @function; \ name: \ jmp *(p_##name) #else #define FUNCTION(name) \ .globl _##name; \ _##name: \ jmp *(_p_##name) #endif .text FUNCTION(PyEval_ReleaseLock) FUNCTION(PyEval_AcquireLock) FUNCTION(PyThreadState_Get) FUNCTION(PyRun_SimpleString) FUNCTION(PyEval_InitThreads) FUNCTION(Py_Initialize) FUNCTION(Py_IsInitialized) FUNCTION(Py_Finalize) FUNCTION(Py_NewInterpreter) FUNCTION(Py_EndInterpreter) FUNCTION(PyThreadState_Swap) FUNCTION(PyErr_SetString) FUNCTION(PyThreadState_New) FUNCTION(PyErr_Print) FUNCTION(PyErr_Occurred) FUNCTION(PyRun_SimpleFile) FUNCTION(PySys_SetPath) #ifdef _LINUX FUNCTION(Py_GetPath) #endif FUNCTION(PyThreadState_Delete) FUNCTION(PyThreadState_Clear) FUNCTION(Py_BuildValue) FUNCTION(PyArg_Parse) FUNCTION(PyArg_ParseTuple) FUNCTION(PyType_IsSubtype) FUNCTION(PyArg_ParseTupleAndKeywords) FUNCTION(PyString_AsString) FUNCTION(Py_AddPendingCall) FUNCTION(PyList_GetItem) FUNCTION(PyList_Size) FUNCTION(_PyObject_New) FUNCTION(PyLong_AsLong) FUNCTION(PyLong_AsLongLong) FUNCTION(PyErr_Format) #if !defined(_LINUX) || defined(__APPLE__) FUNCTION(PyUnicodeUCS2_AsUnicode) #else FUNCTION(PyUnicodeUCS4_AsUnicode) #endif FUNCTION(Py_MakePendingCalls) FUNCTION(PyEval_SaveThread) FUNCTION(PyEval_RestoreThread) FUNCTION(PyLong_FromLong) FUNCTION(PyModule_AddStringConstant) FUNCTION(PyModule_AddObject) FUNCTION(Py_InitModule4) FUNCTION(PyInt_AsLong) FUNCTION(PyFloat_AsDouble) FUNCTION(PyString_FromString) FUNCTION(PyModule_AddIntConstant) FUNCTION(PyObject_CallFunction) FUNCTION(PyObject_CallMethod) FUNCTION(PyDict_SetItemString) FUNCTION(PyDict_New) FUNCTION(PyModule_GetDict) FUNCTION(PyImport_Import) FUNCTION(PyInt_FromLong) FUNCTION(PyDict_GetItemString) FUNCTION(PyDict_Next) FUNCTION(PyDict_Size) FUNCTION(PyType_Ready) FUNCTION(PyType_GenericNew) FUNCTION(PySys_SetArgv) FUNCTION(PyObject_RichCompare) FUNCTION(PyFloat_FromDouble)