Browse Source

interrogate: handle implicit destructors correctly

rdb 8 years ago
parent
commit
e1c916cdc3

+ 2 - 1
dtool/src/interrogate/interfaceMakerPythonNative.cxx

@@ -1133,7 +1133,8 @@ write_class_declarations(ostream &out, ostream *out_h, Object *obj) {
   // to a macro function.
   out << "typedef " << c_class_name << " " << class_name << "_localtype;\n";
   if (obj->_itype.has_destructor() ||
-      obj->_itype.destructor_is_inherited()) {
+      obj->_itype.destructor_is_inherited() ||
+      obj->_itype.destructor_is_implicit()) {
 
     if (TypeManager::is_reference_count(type)) {
       out << "Define_Module_ClassRef";

+ 8 - 0
dtool/src/interrogatedb/interrogateType.I

@@ -343,6 +343,14 @@ destructor_is_inherited() const {
   return (_flags & F_inherited_destructor) != 0;
 }
 
+/**
+ *
+ */
+INLINE bool InterrogateType::
+destructor_is_implicit() const {
+  return (_flags & F_implicit_destructor) != 0;
+}
+
 /**
  *
  */

+ 1 - 0
dtool/src/interrogatedb/interrogateType.h

@@ -82,6 +82,7 @@ public:
   INLINE FunctionIndex get_constructor(int n) const;
   INLINE bool has_destructor() const;
   INLINE bool destructor_is_inherited() const;
+  INLINE bool destructor_is_implicit() const;
   INLINE FunctionIndex get_destructor() const;
   INLINE int number_of_elements() const;
   INLINE ElementIndex get_element(int n) const;

+ 3 - 2
dtool/src/parser-inc/btBulletDynamicsCommon.h

@@ -65,7 +65,6 @@ class btPoint2PointConstraint;
 class btPolyhedralConvexShape;
 class btQuaternion;
 class btSequentialImpulseConstraintSolver;
-class btScalar;
 class btSliderConstraint;
 class btSoftBodyHelpers;
 class btSoftBodyRigidBodyCollisionConfiguration;
@@ -80,11 +79,13 @@ class btTranslationalLimitMotor;
 class btTriangleMesh;
 class btTypedConstraint;
 class btTypedObject;
-class btVector3;
 class btVehicleRaycaster;
 
 template <typename T> class btAlignedObjectArray;
 
+struct btVector3 {};
+typedef double btScalar;
+
 class btWheelInfo {
 public:
   class RaycastInfo;