/* common utility macros * See http://www.python-ldap.org/ for details. * $Id: common.h,v 1.8 2009/04/17 12:19:09 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_ */