home *** CD-ROM | disk | FTP | other *** search
/ Freelog 33 / Freelog033.iso / Progr / Python-2.2.1.exe / PYTHON.H < prev    next >
Encoding:
C/C++ Source or Header  |  2002-01-12  |  3.1 KB  |  135 lines

  1. #ifndef Py_PYTHON_H
  2. #define Py_PYTHON_H
  3. /* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */
  4.  
  5.  
  6. /* Enable compiler features; switching on C lib defines doesn't work
  7.    here, because the symbols haven't necessarily been defined yet. */
  8. #ifndef _GNU_SOURCE
  9. # define _GNU_SOURCE    1
  10. #endif
  11.  
  12. /* Forcing SUSv2 compatibility still produces problems on some
  13.    platforms, True64 and SGI IRIX begin two of them, so for now the
  14.    define is switched off. */
  15. #if 0
  16. #ifndef _XOPEN_SOURCE
  17. # define _XOPEN_SOURCE    500
  18. #endif
  19. #endif
  20.  
  21. /* Include nearly all Python header files */
  22.  
  23. #include "patchlevel.h"
  24. #include "pyconfig.h"
  25.  
  26. #ifdef HAVE_LIMITS_H
  27. #include <limits.h>
  28. #endif
  29.  
  30. /* pyconfig.h may or may not define DL_IMPORT */
  31. #ifndef DL_IMPORT    /* declarations for DLL import/export */
  32. #define DL_IMPORT(RTYPE) RTYPE
  33. #endif
  34. #ifndef DL_EXPORT    /* declarations for DLL import/export */
  35. #define DL_EXPORT(RTYPE) RTYPE
  36. #endif
  37.  
  38. #if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE)
  39. #define _SGI_MP_SOURCE
  40. #endif
  41.  
  42. #include <stdio.h>
  43. #ifndef NULL
  44. #   error "Python.h requires that stdio.h define NULL."
  45. #endif
  46.  
  47. #include <string.h>
  48. #include <errno.h>
  49. #ifdef HAVE_STDLIB_H
  50. #include <stdlib.h>
  51. #endif
  52. #ifdef HAVE_UNISTD_H
  53. #include <unistd.h>
  54. #endif
  55.  
  56. /* CAUTION:  Build setups should ensure that NDEBUG is defined on the
  57.  * compiler command line when building Python in release mode; else
  58.  * assert() calls won't be removed.
  59.  */
  60. #include <assert.h>
  61.  
  62. #include "pyport.h"
  63.  
  64. #include "pymem.h"
  65.  
  66. #include "object.h"
  67. #include "objimpl.h"
  68.  
  69. #include "pydebug.h"
  70.  
  71. #include "unicodeobject.h"
  72. #include "intobject.h"
  73. #include "longobject.h"
  74. #include "floatobject.h"
  75. #ifndef WITHOUT_COMPLEX
  76. #include "complexobject.h"
  77. #endif
  78. #include "rangeobject.h"
  79. #include "stringobject.h"
  80. #include "bufferobject.h"
  81. #include "tupleobject.h"
  82. #include "listobject.h"
  83. #include "dictobject.h"
  84. #include "methodobject.h"
  85. #include "moduleobject.h"
  86. #include "funcobject.h"
  87. #include "classobject.h"
  88. #include "fileobject.h"
  89. #include "cobject.h"
  90. #include "traceback.h"
  91. #include "sliceobject.h"
  92. #include "cellobject.h"
  93. #include "iterobject.h"
  94. #include "descrobject.h"
  95. #include "weakrefobject.h"
  96.  
  97. #include "codecs.h"
  98. #include "pyerrors.h"
  99.  
  100. #include "pystate.h"
  101.  
  102. #include "modsupport.h"
  103. #include "pythonrun.h"
  104. #include "ceval.h"
  105. #include "sysmodule.h"
  106. #include "intrcheck.h"
  107. #include "import.h"
  108.  
  109. #include "abstract.h"
  110.  
  111. #define PyArg_GetInt(v, a)    PyArg_Parse((v), "i", (a))
  112. #define PyArg_NoArgs(v)        PyArg_Parse(v, "")
  113.  
  114. /* Convert a possibly signed character to a nonnegative int */
  115. /* XXX This assumes characters are 8 bits wide */
  116. #ifdef __CHAR_UNSIGNED__
  117. #define Py_CHARMASK(c)        (c)
  118. #else
  119. #define Py_CHARMASK(c)        ((c) & 0xff)
  120. #endif
  121.  
  122. #include "pyfpe.h"
  123.  
  124. /* These definitions must match corresponding definitions in graminit.h.
  125.    There's code in compile.c that checks that they are the same. */
  126. #define Py_single_input 256
  127. #define Py_file_input 257
  128. #define Py_eval_input 258
  129.  
  130. #ifdef HAVE_PTH
  131. /* GNU pth user-space thread support */
  132. #include <pth.h>
  133. #endif
  134. #endif /* !Py_PYTHON_H */
  135.