/* David Leonard , 1999. Public domain. */ /* * common utility macros * * $Id: common.h,v 1.6 2006/12/06 07:36:00 stroeder Exp $ */ #ifndef __h_common #define __h_common #define PY_SSIZE_T_CLEAN #include "Python.h" #if defined(HAVE_CONFIG_H) #include "config.h" #endif #if defined(MS_WINDOWS) #include #else /* unix */ #include #include #include #endif /* Backwards compability with Python prior 2.5 */ #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #endif #include #define streq( a, b ) \ ( (*(a)==*(b)) && 0==strcmp(a,b) ) void LDAPadd_methods( PyObject*d, PyMethodDef*methods ); #define PyNone_Check(o) ((o) == Py_None) #endif /* __h_common_ */