diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-06-09 00:13:35 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-06-09 00:20:25 +0300 |
commit | 8a757bf34ad2d01104e300e0ce529d01f2965e09 (patch) | |
tree | 8505699fff706f2229b8a025305d704142f9bec8 /source/blender/python | |
parent | 46c073e4ac38fae5209b82284313b740b132fd66 (diff) |
RNA: remove static strings from registration
* Static strings aren't needed anymore, use stack memory.
* Fix obscure leak on failed macro registration.
* Use prefix for wrappers exported from bpy module.
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/intern/bpy_operator_wrap.c | 4 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_operator_wrap.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/python/intern/bpy_operator_wrap.c b/source/blender/python/intern/bpy_operator_wrap.c index 11e27ca3e3c..90719905a79 100644 --- a/source/blender/python/intern/bpy_operator_wrap.c +++ b/source/blender/python/intern/bpy_operator_wrap.c @@ -118,7 +118,7 @@ static void operator_properties_init(wmOperatorType *ot) } -void operator_wrapper(wmOperatorType *ot, void *userdata) +void BPY_RNA_operator_wrapper(wmOperatorType *ot, void *userdata) { /* take care not to overwrite anything set in * WM_operatortype_append_ptr before opfunc() is called */ @@ -134,7 +134,7 @@ void operator_wrapper(wmOperatorType *ot, void *userdata) operator_properties_init(ot); } -void macro_wrapper(wmOperatorType *ot, void *userdata) +void BPY_RNA_operator_macro_wrapper(wmOperatorType *ot, void *userdata) { wmOperatorType *data = (wmOperatorType *)userdata; diff --git a/source/blender/python/intern/bpy_operator_wrap.h b/source/blender/python/intern/bpy_operator_wrap.h index 05a566a1485..0828c58e2bd 100644 --- a/source/blender/python/intern/bpy_operator_wrap.h +++ b/source/blender/python/intern/bpy_operator_wrap.h @@ -33,7 +33,7 @@ struct wmOperatorType; PyObject *PYOP_wrap_macro_define(PyObject *self, PyObject *args); /* exposed to rna/wm api */ -void operator_wrapper(struct wmOperatorType *ot, void *userdata); -void macro_wrapper(struct wmOperatorType *ot, void *userdata); +void BPY_RNA_operator_wrapper(struct wmOperatorType *ot, void *userdata); +void BPY_RNA_operator_macro_wrapper(struct wmOperatorType *ot, void *userdata); #endif |