fix compiling issues w/o python

This commit is contained in:
David Rose 2004-05-19 05:32:26 +00:00
parent 27b8913ad9
commit 3fac39f032
3 changed files with 8 additions and 0 deletions

View File

@ -475,7 +475,9 @@ ai_format_generate(PyObject *distobj, int do_id,
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
DCClass:: DCClass::
DCClass(const string &name) : _name(name) { DCClass(const string &name) : _name(name) {
#ifdef HAVE_PYTHON
_class_def = NULL; _class_def = NULL;
#endif
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
@ -490,7 +492,9 @@ DCClass::
delete (*fi); delete (*fi);
} }
#ifdef HAVE_PYTHON
Py_XDECREF(_class_def); Py_XDECREF(_class_def);
#endif
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////

View File

@ -90,7 +90,9 @@ private:
typedef pvector<DCField *> Fields; typedef pvector<DCField *> Fields;
Fields _fields; Fields _fields;
#ifdef HAVE_PYTHON
PyObject *_class_def; PyObject *_class_def;
#endif
public: public:
// These members are built up during parsing for the convenience of // These members are built up during parsing for the convenience of

View File

@ -75,7 +75,9 @@ using namespace std;
// Panda defines some assert-type macros. We map those to the // Panda defines some assert-type macros. We map those to the
// standard assert macro outside of Panda. // standard assert macro outside of Panda.
#define nassertr(condition, return_value) assert(condition) #define nassertr(condition, return_value) assert(condition)
#define nassertr_always(condition, return_value) assert(condition)
#define nassertv(condition) assert(condition) #define nassertv(condition) assert(condition)
#define nassertv_always(condition) assert(condition)
// Panda defines these export symbols for building DLL's. Outside of // Panda defines these export symbols for building DLL's. Outside of
// Panda, we assume we're not putting this code in a DLL, so we define // Panda, we assume we're not putting this code in a DLL, so we define