Python2/Config.hxx
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef __PyCXX_config_hh__
00039 #define __PyCXX_config_hh__
00040
00041
00042
00043
00044 #if defined( _MSC_VER )
00045
00046 # define STANDARD_LIBRARY_HAS_ITERATOR_TRAITS 1
00047
00048 #elif defined( __GNUC__ )
00049 # if __GNUC__ >= 3
00050 # define STANDARD_LIBRARY_HAS_ITERATOR_TRAITS 1
00051 # else
00052 # define STANDARD_LIBRARY_HAS_ITERATOR_TRAITS 0
00053 #endif
00054
00055
00056
00057
00058 #else
00059
00060
00061 # define STANDARD_LIBRARY_HAS_ITERATOR_TRAITS 1
00062 #endif
00063
00064 #if STANDARD_LIBRARY_HAS_ITERATOR_TRAITS
00065 # define random_access_iterator_parent(itemtype) std::iterator<std::random_access_iterator_tag,itemtype,int>
00066 #else
00067 # define random_access_iterator_parent(itemtype) std::random_access_iterator<itemtype, int>
00068 #endif
00069
00070
00071
00072
00073 #if defined( _MSC_VER )
00074 # if _MSC_VER <= 1200
00075
00076 # define PYCXX_ISO_CPP_LIB 0
00077 # define STR_STREAM <strstream>
00078 # define TEMPLATE_TYPENAME class
00079 # else
00080 # define PYCXX_ISO_CPP_LIB 1
00081 # define STR_STREAM <sstream>
00082 # define TEMPLATE_TYPENAME typename
00083 # endif
00084 #elif defined( __GNUC__ )
00085 # if __GNUC__ >= 3
00086 # define PYCXX_ISO_CPP_LIB 1
00087 # define STR_STREAM <sstream>
00088 # define TEMPLATE_TYPENAME typename
00089 # else
00090 # define PYCXX_ISO_CPP_LIB 0
00091 # define STR_STREAM <strstream>
00092 # define TEMPLATE_TYPENAME class
00093 # endif
00094 #endif
00095
00096 #if PYCXX_ISO_CPP_LIB
00097 # define STR_STREAM <sstream>
00098 # define OSTRSTREAM ostringstream
00099 # define EXPLICIT_TYPENAME typename
00100 # define EXPLICIT_CLASS class
00101 # define TEMPLATE_TYPENAME typename
00102 #else
00103 # define STR_STREAM <strstream>
00104 # define OSTRSTREAM ostrstream
00105 # define EXPLICIT_TYPENAME
00106 # define EXPLICIT_CLASS
00107 # define TEMPLATE_TYPENAME class
00108 #endif
00109
00110
00111 #ifndef PY_MAJOR_VERSION
00112 #error not defined PY_MAJOR_VERSION
00113 #endif
00114 #if PY_MAJOR_VERSION < 2 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 5)
00115 typedef int Py_ssize_t;
00116 #endif
00117
00118
00119 #if defined( _MSC_VER )
00120 # pragma warning( disable : 4251 )
00121 #endif
00122 #if defined( _MSC_VER ) || defined( __MINGW32__ )
00123 # ifdef PYCXX_DLL
00124 # define PYCXX_EXPORT __declspec(dllexport)
00125 # else
00126 # define PYCXX_EXPORT __declspec(dllimport)
00127 # endif
00128 #else
00129 # define PYCXX_EXPORT
00130 #endif
00131
00132 #endif // __PyCXX_config_hh__