mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
dtoolbase: fix compile errors with --no-python
This commit is contained in:
parent
995ba28650
commit
6e8cb98861
@ -138,12 +138,10 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_PYTHON
|
|
||||||
// Instead of including the Python headers, which will implicitly add a linker
|
// 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
|
// flag to link in Python, we'll just excerpt the forward declaration of
|
||||||
// PyObject.
|
// PyObject.
|
||||||
typedef struct _object PyObject;
|
typedef struct _object PyObject;
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef HAVE_EIGEN
|
#ifndef HAVE_EIGEN
|
||||||
// If we don't have the Eigen library, don't define LINMATH_ALIGN.
|
// If we don't have the Eigen library, don't define LINMATH_ALIGN.
|
||||||
|
@ -153,6 +153,7 @@ deallocate_array(void *ptr) {
|
|||||||
PANDA_FREE_ARRAY(ptr);
|
PANDA_FREE_ARRAY(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_PYTHON
|
||||||
/**
|
/**
|
||||||
* Returns the internal void pointer that is stored for interrogate's benefit.
|
* Returns the internal void pointer that is stored for interrogate's benefit.
|
||||||
*/
|
*/
|
||||||
@ -165,6 +166,7 @@ get_python_type() const {
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the Index of the BEst fit Classs from a set
|
* Return the Index of the BEst fit Classs from a set
|
||||||
|
@ -138,7 +138,9 @@ PUBLISHED:
|
|||||||
MAKE_SEQ_PROPERTY(child_classes, get_num_child_classes, get_child_class);
|
MAKE_SEQ_PROPERTY(child_classes, get_num_child_classes, get_child_class);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
#ifdef HAVE_PYTHON
|
||||||
PyObject *get_python_type() const;
|
PyObject *get_python_type() const;
|
||||||
|
#endif
|
||||||
|
|
||||||
void *allocate_array(size_t size) RETURNS_ALIGNED(MEMORY_HOOK_ALIGNMENT);
|
void *allocate_array(size_t size) RETURNS_ALIGNED(MEMORY_HOOK_ALIGNMENT);
|
||||||
void *reallocate_array(void *ptr, size_t size) RETURNS_ALIGNED(MEMORY_HOOK_ALIGNMENT);
|
void *reallocate_array(void *ptr, size_t size) RETURNS_ALIGNED(MEMORY_HOOK_ALIGNMENT);
|
||||||
|
@ -207,6 +207,7 @@ record_alternate_name(TypeHandle type, const string &name) {
|
|||||||
_lock->unlock();
|
_lock->unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_PYTHON
|
||||||
/**
|
/**
|
||||||
* Records the given Python type pointer in the type registry for the benefit
|
* Records the given Python type pointer in the type registry for the benefit
|
||||||
* of interrogate.
|
* of interrogate.
|
||||||
@ -222,6 +223,7 @@ record_python_type(TypeHandle type, PyObject *python_type) {
|
|||||||
|
|
||||||
_lock->unlock();
|
_lock->unlock();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Looks for a previously-registered type of the given name. Returns its
|
* Looks for a previously-registered type of the given name. Returns its
|
||||||
|
@ -45,7 +45,9 @@ PUBLISHED:
|
|||||||
|
|
||||||
void record_derivation(TypeHandle child, TypeHandle parent);
|
void record_derivation(TypeHandle child, TypeHandle parent);
|
||||||
void record_alternate_name(TypeHandle type, const std::string &name);
|
void record_alternate_name(TypeHandle type, const std::string &name);
|
||||||
|
#ifdef HAVE_PYTHON
|
||||||
void record_python_type(TypeHandle type, PyObject *python_type);
|
void record_python_type(TypeHandle type, PyObject *python_type);
|
||||||
|
#endif
|
||||||
|
|
||||||
TypeHandle find_type(const std::string &name) const;
|
TypeHandle find_type(const std::string &name) const;
|
||||||
TypeHandle find_type_by_id(int id) const;
|
TypeHandle find_type_by_id(int id) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user