home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 May / PCWorld_2002-05_cd.bin / Software / TemaCD / activepython / ActivePython-2.1.1.msi / Python21_include_Python.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-07-26  |  2.8 KB  |  124 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 "config.h"
  25.  
  26. #ifdef HAVE_LIMITS_H
  27. #include <limits.h>
  28. #endif
  29.  
  30. /* config.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. #include <assert.h>
  53.  
  54. #include "pyport.h"
  55.  
  56. #include "pymem.h"
  57.  
  58. #include "object.h"
  59. #include "objimpl.h"
  60.  
  61. #include "pydebug.h"
  62.  
  63. #include "unicodeobject.h"
  64. #include "intobject.h"
  65. #include "longobject.h"
  66. #include "floatobject.h"
  67. #ifndef WITHOUT_COMPLEX
  68. #include "complexobject.h"
  69. #endif
  70. #include "rangeobject.h"
  71. #include "stringobject.h"
  72. #include "bufferobject.h"
  73. #include "tupleobject.h"
  74. #include "listobject.h"
  75. #include "dictobject.h"
  76. #include "methodobject.h"
  77. #include "moduleobject.h"
  78. #include "funcobject.h"
  79. #include "classobject.h"
  80. #include "fileobject.h"
  81. #include "cobject.h"
  82. #include "traceback.h"
  83. #include "sliceobject.h"
  84. #include "cellobject.h"
  85.  
  86. #include "codecs.h"
  87. #include "pyerrors.h"
  88.  
  89. #include "pystate.h"
  90.  
  91. #include "modsupport.h"
  92. #include "ceval.h"
  93. #include "pythonrun.h"
  94. #include "sysmodule.h"
  95. #include "intrcheck.h"
  96. #include "import.h"
  97.  
  98. #include "abstract.h"
  99.  
  100. #define PyArg_GetInt(v, a)    PyArg_Parse((v), "i", (a))
  101. #define PyArg_NoArgs(v)        PyArg_Parse(v, "")
  102.  
  103. /* Convert a possibly signed character to a nonnegative int */
  104. /* XXX This assumes characters are 8 bits wide */
  105. #ifdef __CHAR_UNSIGNED__
  106. #define Py_CHARMASK(c)        (c)
  107. #else
  108. #define Py_CHARMASK(c)        ((c) & 0xff)
  109. #endif
  110.  
  111. #include "pyfpe.h"
  112.  
  113. /* These definitions must match corresponding definitions in graminit.h.
  114.    There's code in compile.c that checks that they are the same. */
  115. #define Py_single_input 256
  116. #define Py_file_input 257
  117. #define Py_eval_input 258
  118.  
  119. #ifdef HAVE_PTH
  120. /* GNU pth user-space thread support */
  121. #include <pth.h>
  122. #endif
  123. #endif /* !Py_PYTHON_H */
  124.