mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
tweaks
This commit is contained in:
parent
dc6c73108c
commit
33a94a3996
@ -1033,7 +1033,6 @@ pyobj_to_xml(PyObject *value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Now that it's stored in the map, increment its reference count.
|
// Now that it's stored in the map, increment its reference count.
|
||||||
// TODO: implement removing things from this map.
|
|
||||||
Py_INCREF(value);
|
Py_INCREF(value);
|
||||||
|
|
||||||
xvalue->SetAttribute("type", "python");
|
xvalue->SetAttribute("type", "python");
|
||||||
|
@ -485,7 +485,6 @@ p3dobj_to_xml(P3D_object *obj) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Now that it's stored in the map, increment its reference count.
|
// Now that it's stored in the map, increment its reference count.
|
||||||
// TODO: implement removing things from this map.
|
|
||||||
P3D_OBJECT_INCREF(obj);
|
P3D_OBJECT_INCREF(obj);
|
||||||
|
|
||||||
xvalue->SetAttribute("type", "browser");
|
xvalue->SetAttribute("type", "browser");
|
||||||
|
@ -124,21 +124,21 @@ P3D_instance_setup_window(P3D_instance *instance,
|
|||||||
void
|
void
|
||||||
P3D_object_incref(P3D_object *object) {
|
P3D_object_incref(P3D_object *object) {
|
||||||
assert(P3DInstanceManager::get_global_ptr()->is_initialized());
|
assert(P3DInstanceManager::get_global_ptr()->is_initialized());
|
||||||
|
if (object != NULL) {
|
||||||
ACQUIRE_LOCK(_api_lock);
|
ACQUIRE_LOCK(_api_lock);
|
||||||
|
|
||||||
P3D_OBJECT_INCREF(object);
|
P3D_OBJECT_INCREF(object);
|
||||||
|
|
||||||
RELEASE_LOCK(_api_lock);
|
RELEASE_LOCK(_api_lock);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
P3D_object_decref(P3D_object *object) {
|
P3D_object_decref(P3D_object *object) {
|
||||||
assert(P3DInstanceManager::get_global_ptr()->is_initialized());
|
assert(P3DInstanceManager::get_global_ptr()->is_initialized());
|
||||||
|
if (object != NULL) {
|
||||||
ACQUIRE_LOCK(_api_lock);
|
ACQUIRE_LOCK(_api_lock);
|
||||||
|
|
||||||
P3D_OBJECT_DECREF(object);
|
P3D_OBJECT_DECREF(object);
|
||||||
|
|
||||||
RELEASE_LOCK(_api_lock);
|
RELEASE_LOCK(_api_lock);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
P3D_class_definition *
|
P3D_class_definition *
|
||||||
|
@ -475,7 +475,8 @@ struct _P3D_object {
|
|||||||
#define P3D_OBJECT_DECREF(object) { if (--(object)->_ref_count <= 0) { (object)->_class->_finish((object)); } }
|
#define P3D_OBJECT_DECREF(object) { if (--(object)->_ref_count <= 0) { (object)->_class->_finish((object)); } }
|
||||||
#define P3D_OBJECT_XDECREF(object) { if ((object) != (P3D_object *)NULL) { P3D_OBJECT_DECREF(object); } }
|
#define P3D_OBJECT_XDECREF(object) { if ((object) != (P3D_object *)NULL) { P3D_OBJECT_DECREF(object); } }
|
||||||
|
|
||||||
/* Use these functions for thread-safe variants of the above. */
|
/* Use these functions for thread-safe variants of the above. You may
|
||||||
|
safely pass a NULL pointer into either; it will be ignored. */
|
||||||
typedef void
|
typedef void
|
||||||
P3D_object_incref_func(P3D_object *object);
|
P3D_object_incref_func(P3D_object *object);
|
||||||
typedef void
|
typedef void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user