- use static vars and functions where possible.
- use NULL rather than 0 when used as pointers.
This commit is contained in:
@@ -28,13 +28,14 @@
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#include "bpy_intern_string.h"
|
||||
|
||||
PyObject *bpy_intern_str_register;
|
||||
PyObject *bpy_intern_str_unregister;
|
||||
PyObject *bpy_intern_str_bl_rna;
|
||||
PyObject *bpy_intern_str_order;
|
||||
PyObject *bpy_intern_str_attr;
|
||||
PyObject *bpy_intern_str___slots__;
|
||||
PyObject *bpy_intern_str___bases__;
|
||||
|
||||
void bpy_intern_string_init(void)
|
||||
{
|
||||
|
@@ -117,7 +117,7 @@ static PyObject *pymeth_PointerProperty= NULL;
|
||||
static PyObject *pymeth_CollectionProperty= NULL;
|
||||
static PyObject *pymeth_RemoveProperty= NULL;
|
||||
|
||||
PyObject *pyrna_struct_as_instance(PointerRNA *ptr)
|
||||
static PyObject *pyrna_struct_as_instance(PointerRNA *ptr)
|
||||
{
|
||||
PyObject *self= NULL;
|
||||
/* first get self */
|
||||
@@ -177,7 +177,7 @@ static PyObject *bpy_prop_deferred_return(PyObject *func, PyObject *kw)
|
||||
}
|
||||
|
||||
/* callbacks */
|
||||
void bpy_prop_update_cb(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop)
|
||||
static void bpy_prop_update_cb(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop)
|
||||
{
|
||||
PyGILState_STATE gilstate;
|
||||
PyObject **py_data= (PyObject **)RNA_property_py_data_get(prop);
|
||||
|
Reference in New Issue
Block a user