home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 15 / AACD15.ISO / AACD / Programming / Python2 / Python20_source / Include / Python.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-10-25  |  3.0 KB  |  144 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. #ifdef _AMIGA
  54. # ifdef HAVE_FCNTL_H
  55. #  include <fcntl.h>
  56. # endif
  57. # if !defined(AMITCP) && !defined(INET225)
  58. #  include <stat.h>
  59. typedef unsigned long pid_t;
  60. # endif
  61. #endif
  62. /* Include proper Amiga SAS/C math include files */
  63. #ifdef __SASC
  64. #if defined(_IEEE) && !defined(_M68881)
  65. #include <mieeedoub.h>
  66. #endif
  67. #ifdef _FFP
  68. #include <mffp.h>
  69. #endif
  70. #ifdef _M68881
  71. #include <m68881.h>
  72. #endif
  73. #endif
  74.  
  75. #include "pyport.h"
  76.  
  77. #include "pymem.h"
  78.  
  79. #include "object.h"
  80. #include "objimpl.h"
  81.  
  82. #include "pydebug.h"
  83.  
  84. #include "unicodeobject.h"
  85. #include "intobject.h"
  86. #include "longobject.h"
  87. #include "floatobject.h"
  88. #ifndef WITHOUT_COMPLEX
  89. #include "complexobject.h"
  90. #endif
  91. #include "rangeobject.h"
  92. #include "stringobject.h"
  93. #include "bufferobject.h"
  94. #include "tupleobject.h"
  95. #include "listobject.h"
  96. #include "dictobject.h"
  97. #include "methodobject.h"
  98. #include "moduleobject.h"
  99. #include "funcobject.h"
  100. #include "classobject.h"
  101. #include "fileobject.h"
  102. #include "cobject.h"
  103. #include "traceback.h"
  104. #include "sliceobject.h"
  105.  
  106. #include "codecs.h"
  107. #include "pyerrors.h"
  108.  
  109. #include "pystate.h"
  110.  
  111. #include "modsupport.h"
  112. #include "ceval.h"
  113. #include "pythonrun.h"
  114. #include "sysmodule.h"
  115. #include "intrcheck.h"
  116. #include "import.h"
  117.  
  118. #include "abstract.h"
  119.  
  120. #define PyArg_GetInt(v, a)    PyArg_Parse((v), "i", (a))
  121. #define PyArg_NoArgs(v)        PyArg_Parse(v, "")
  122.  
  123. /* Convert a possibly signed character to a nonnegative int */
  124. /* XXX This assumes characters are 8 bits wide */
  125. #ifdef __CHAR_UNSIGNED__
  126. #define Py_CHARMASK(c)        (c)
  127. #else
  128. #define Py_CHARMASK(c)        ((c) & 0xff)
  129. #endif
  130.  
  131. #include "pyfpe.h"
  132.  
  133. /* These definitions must match corresponding definitions in graminit.h.
  134.    There's code in compile.c that checks that they are the same. */
  135. #define Py_single_input 256
  136. #define Py_file_input 257
  137. #define Py_eval_input 258
  138.  
  139. #ifdef HAVE_PTH
  140. /* GNU pth user-space thread support */
  141. #include <pth.h>
  142. #endif
  143. #endif /* !Py_PYTHON_H */
  144.