dtoolbase: fix compile errors with --no-python

This commit is contained in:
rdb 2018-11-06 20:32:37 +01:00
parent 995ba28650
commit 6e8cb98861
5 changed files with 8 additions and 2 deletions

View File

@ -138,12 +138,10 @@
#endif
#endif
#ifdef HAVE_PYTHON
// Instead of including the Python headers, which will implicitly add a linker
// flag to link in Python, we'll just excerpt the forward declaration of
// PyObject.
typedef struct _object PyObject;
#endif
#ifndef HAVE_EIGEN
// If we don't have the Eigen library, don't define LINMATH_ALIGN.

View File

@ -153,6 +153,7 @@ deallocate_array(void *ptr) {
PANDA_FREE_ARRAY(ptr);
}
#ifdef HAVE_PYTHON
/**
* Returns the internal void pointer that is stored for interrogate's benefit.
*/
@ -165,6 +166,7 @@ get_python_type() const {
return nullptr;
}
}
#endif
/**
* Return the Index of the BEst fit Classs from a set

View File

@ -138,7 +138,9 @@ PUBLISHED:
MAKE_SEQ_PROPERTY(child_classes, get_num_child_classes, get_child_class);
public:
#ifdef HAVE_PYTHON
PyObject *get_python_type() const;
#endif
void *allocate_array(size_t size) RETURNS_ALIGNED(MEMORY_HOOK_ALIGNMENT);
void *reallocate_array(void *ptr, size_t size) RETURNS_ALIGNED(MEMORY_HOOK_ALIGNMENT);

View File

@ -207,6 +207,7 @@ record_alternate_name(TypeHandle type, const string &name) {
_lock->unlock();
}
#ifdef HAVE_PYTHON
/**
* Records the given Python type pointer in the type registry for the benefit
* of interrogate.
@ -222,6 +223,7 @@ record_python_type(TypeHandle type, PyObject *python_type) {
_lock->unlock();
}
#endif
/**
* Looks for a previously-registered type of the given name. Returns its

View File

@ -45,7 +45,9 @@ PUBLISHED:
void record_derivation(TypeHandle child, TypeHandle parent);
void record_alternate_name(TypeHandle type, const std::string &name);
#ifdef HAVE_PYTHON
void record_python_type(TypeHandle type, PyObject *python_type);
#endif
TypeHandle find_type(const std::string &name) const;
TypeHandle find_type_by_id(int id) const;