[pylucene-dev] finalizing the deadly embrace

Bill Janssen janssen at parc.com
Wed Jan 23 19:21:51 PST 2008


> The latest changes seem to have solved my problem.

To get them to build on Tiger, (Python 2.3.5) I had to add the
following to the front of jcc/jcc/jcc/sources/functions.cpp (after
the "using namespace" statements).

#ifndef Py_CLEAR
#define Py_CLEAR(op)				\
        do {                            	\
                if (op) {			\
                        PyObject *tmp = (PyObject *)(op);	\
                        (op) = NULL;		\
                        Py_DECREF(tmp);		\
                }				\
        } while (0)
#endif

#ifndef Py_VISIT
#define Py_VISIT(op)							\
        do { 								\
                if (op) {						\
                        int vret = visit((PyObject *)(op), arg);	\
                        if (vret)					\
                                return vret;				\
                }							\
        } while (0)
#endif

Bill



More information about the pylucene-dev mailing list