[KoCo-CVS] [Commit] cjkcodecs/src multibytecodec_compat.h
Brought to you by:
perky
From: Hye-Shik C. <pe...@us...> - 2003-06-20 09:22:59
|
perky 03/06/20 02:22:58 Modified: src multibytecodec_compat.h Log: Add a workaround for PyObject_GenericGetAttr to enable compiling with mingw32. Revision Changes Path 1.3 +10 -2 cjkcodecs/src/multibytecodec_compat.h Index: multibytecodec_compat.h =================================================================== RCS file: /cvsroot/koco/cjkcodecs/src/multibytecodec_compat.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- multibytecodec_compat.h 6 Jun 2003 06:27:42 -0000 1.2 +++ multibytecodec_compat.h 20 Jun 2003 09:22:58 -0000 1.3 @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: multibytecodec_compat.h,v 1.2 2003/06/06 06:27:42 perky Exp $ + * $Id: multibytecodec_compat.h,v 1.3 2003/06/20 09:22:58 perky Exp $ */ /* We don't support 2.0 and older */ @@ -62,7 +62,15 @@ #else # define OLD_GETATTR_DEF(prefix) # define GETATTR_FUNC(prefix) 0 -# define GETATTRO_FUNC(prefix) PyObject_GenericGetAttr +# ifdef __MINGW32__ +__inline static PyObject* __dummy_getattro(PyObject* self, PyObject* args) +{ + return PyObject_GenericGetAttr(self, args); +} +# define GETATTRO_FUNC(prefix) __dummy_getattro +# else +# define GETATTRO_FUNC(prefix) PyObject_GenericGetAttr +# endif #endif /* |