home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 April / PCWorld_2001-04_cd.bin / Software / TemaCD / webclean / !!!python!!! / BeOpen-Python-2.0.exe / PYTHON.H < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-26  |  2.8 KB  |  123 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.  
  85. #include "codecs.h"
  86. #include "pyerrors.h"
  87.  
  88. #include "pystate.h"
  89.  
  90. #include "modsupport.h"
  91. #include "ceval.h"
  92. #include "pythonrun.h"
  93. #include "sysmodule.h"
  94. #include "intrcheck.h"
  95. #include "import.h"
  96.  
  97. #include "abstract.h"
  98.  
  99. #define PyArg_GetInt(v, a)    PyArg_Parse((v), "i", (a))
  100. #define PyArg_NoArgs(v)        PyArg_Parse(v, "")
  101.  
  102. /* Convert a possibly signed character to a nonnegative int */
  103. /* XXX This assumes characters are 8 bits wide */
  104. #ifdef __CHAR_UNSIGNED__
  105. #define Py_CHARMASK(c)        (c)
  106. #else
  107. #define Py_CHARMASK(c)        ((c) & 0xff)
  108. #endif
  109.  
  110. #include "pyfpe.h"
  111.  
  112. /* These definitions must match corresponding definitions in graminit.h.
  113.    There's code in compile.c that checks that they are the same. */
  114. #define Py_single_input 256
  115. #define Py_file_input 257
  116. #define Py_eval_input 258
  117.  
  118. #ifdef HAVE_PTH
  119. /* GNU pth user-space thread support */
  120. #include <pth.h>
  121. #endif
  122. #endif /* !Py_PYTHON_H */
  123.