diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-08-28 09:06:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-08-28 09:06:30 +0400 |
commit | fa2ba5fbf5848e4d61b697c624af9b9e9456eb20 (patch) | |
tree | 8c7f0bcfc6af77f1bb491d4e4d230493f9d897c0 /source/blender/python | |
parent | c73d5b939dd9dcc68ed1d1316115c2c7cded9cab (diff) |
- use static vars and functions where possible.
- use NULL rather than 0 when used as pointers.
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/intern/bpy_intern_string.c | 3 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_props.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/python/intern/bpy_intern_string.c b/source/blender/python/intern/bpy_intern_string.c index c6629007532..6fc861b2a0d 100644 --- a/source/blender/python/intern/bpy_intern_string.c +++ b/source/blender/python/intern/bpy_intern_string.c @@ -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) { diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c index a0ad1ff7850..5da142aeea7 100644 --- a/source/blender/python/intern/bpy_props.c +++ b/source/blender/python/intern/bpy_props.c @@ -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); |