PageRenderTime 40ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/py2exe/source/Python-dynload.h

https://bitbucket.org/briancurtin/py2exe3
C++ Header | 58 lines | 39 code | 14 blank | 5 comment | 0 complexity | 445cf6086eb6d32bc7790bc0f7fdef4f MD5 | raw file
  1. /* **************** Python-dynload.h **************** */
  2. #include "Python-version.h"
  3. typedef void *PyObject;
  4. typedef void *PyCodeObject;
  5. typedef PyObject *(*PyCFunction)(PyObject *, PyObject *);
  6. typedef
  7. enum {PyGILState_LOCKED, PyGILState_UNLOCKED}
  8. PyGILState_STATE;
  9. typedef struct {
  10. char *ml_name;
  11. PyCFunction ml_meth;
  12. int ml_flags;
  13. char *ml_doc;
  14. } PyMethodDef;
  15. struct IMPORT {
  16. char *name;
  17. void (*proc)();
  18. };
  19. extern int _load_python(char *dllname, char *dllbytes);
  20. extern struct IMPORT imports[];
  21. #include "import-tab.h"
  22. extern void Py_XINCREF(PyObject *);
  23. #define snprintf _snprintf
  24. #define Py_DECREF(x) Py_XDECREF(x)
  25. #define Py_INCREF(x) Py_XINCREF(x)
  26. extern void Py_XDECREF(PyObject *ob);
  27. #define METH_OLDARGS 0x0000
  28. #define METH_VARARGS 0x0001
  29. #define METH_KEYWORDS 0x0002
  30. /* METH_NOARGS and METH_O must not be combined with the flags above. */
  31. #define METH_NOARGS 0x0004
  32. #define METH_O 0x0008
  33. /* METH_CLASS and METH_STATIC are a little different; these control
  34. the construction of methods for a class. These cannot be used for
  35. functions in modules. */
  36. #define METH_CLASS 0x0010
  37. #define METH_STATIC 0x0020
  38. #define PyCFunction_New(ML, SELF) PyCFunction_NewEx((ML), (SELF), NULL)
  39. #define PyInt_Check(op) PyObject_IsInstance(op, &PyInt_Type) /* ??? */
  40. #define Py_None (&_Py_NoneStruct)
  41. #define DL_EXPORT(x) x
  42. #define Py_InitModule3(name, methods, doc) \
  43. Py_InitModule4(name, methods, doc, (PyObject *)NULL, \
  44. PYTHON_API_VERSION)