Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-09-02 07:13:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-09-02 07:13:51 +0400
commit54310b8086e5820049f73f66fde8c92041fdb61a (patch)
treed609ba2de71e27ae8af41742930fecbf418c2fcd /source/blender/python/bmesh
parentd59b4752e432aa1188fe9082a99d3aa6f6d59ab1 (diff)
bmesh: internal api change, remove BMOElemMapping, its not needed since the values can be stored in the ghash directly.
saves 24 bytes per element (per vertex/edge/face on a 64bit system), for bmesh operators.
Diffstat (limited to 'source/blender/python/bmesh')
-rw-r--r--source/blender/python/bmesh/bmesh_py_ops_call.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_ops_call.c b/source/blender/python/bmesh/bmesh_py_ops_call.c
index 6c7fc686cc0..ec9f2865582 100644
--- a/source/blender/python/bmesh/bmesh_py_ops_call.c
+++ b/source/blender/python/bmesh/bmesh_py_ops_call.c
@@ -581,11 +581,11 @@ static PyObject *bpy_slot_to_py(BMesh *bm, BMOpSlot *slot)
item = PyDict_New();
if (slot_hash) {
GHASH_ITER (hash_iter, slot_hash) {
- BMHeader *ele_key = BLI_ghashIterator_getKey(&hash_iter);
- BMOElemMapping *ele_val = BLI_ghashIterator_getValue(&hash_iter);
+ BMHeader *ele_key = BLI_ghashIterator_getKey(&hash_iter);
+ void *ele_val = BLI_ghashIterator_getValue(&hash_iter);
- PyObject *py_key = BPy_BMElem_CreatePyObject(bm, ele_key);
- PyObject *py_val = BPy_BMElem_CreatePyObject(bm, *(void **)BMO_OP_SLOT_MAPPING_DATA(ele_val));
+ PyObject *py_key = BPy_BMElem_CreatePyObject(bm, ele_key);
+ PyObject *py_val = BPy_BMElem_CreatePyObject(bm, ele_val);
PyDict_SetItem(item, py_key, py_val);
Py_DECREF(py_key);
@@ -599,11 +599,11 @@ static PyObject *bpy_slot_to_py(BMesh *bm, BMOpSlot *slot)
item = PyDict_New();
if (slot_hash) {
GHASH_ITER (hash_iter, slot_hash) {
- BMHeader *ele_key = BLI_ghashIterator_getKey(&hash_iter);
- BMOElemMapping *ele_val = BLI_ghashIterator_getValue(&hash_iter);
+ BMHeader *ele_key = BLI_ghashIterator_getKey(&hash_iter);
+ void *ele_val = BLI_ghashIterator_getValue(&hash_iter);
PyObject *py_key = BPy_BMElem_CreatePyObject(bm, ele_key);
- PyObject *py_val = PyFloat_FromDouble(*(float *)BMO_OP_SLOT_MAPPING_DATA(ele_val));
+ PyObject *py_val = PyFloat_FromDouble(*(float *)&ele_val);
PyDict_SetItem(item, py_key, py_val);
Py_DECREF(py_key);
@@ -617,11 +617,11 @@ static PyObject *bpy_slot_to_py(BMesh *bm, BMOpSlot *slot)
item = PyDict_New();
if (slot_hash) {
GHASH_ITER (hash_iter, slot_hash) {
- BMHeader *ele_key = BLI_ghashIterator_getKey(&hash_iter);
- BMOElemMapping *ele_val = BLI_ghashIterator_getValue(&hash_iter);
+ BMHeader *ele_key = BLI_ghashIterator_getKey(&hash_iter);
+ void *ele_val = BLI_ghashIterator_getValue(&hash_iter);
PyObject *py_key = BPy_BMElem_CreatePyObject(bm, ele_key);
- PyObject *py_val = PyLong_FromLong(*(int *)BMO_OP_SLOT_MAPPING_DATA(ele_val));
+ PyObject *py_val = PyLong_FromLong(*(int *)&ele_val);
PyDict_SetItem(item, py_key, py_val);
Py_DECREF(py_key);
@@ -635,11 +635,11 @@ static PyObject *bpy_slot_to_py(BMesh *bm, BMOpSlot *slot)
item = PyDict_New();
if (slot_hash) {
GHASH_ITER (hash_iter, slot_hash) {
- BMHeader *ele_key = BLI_ghashIterator_getKey(&hash_iter);
- BMOElemMapping *ele_val = BLI_ghashIterator_getValue(&hash_iter);
+ BMHeader *ele_key = BLI_ghashIterator_getKey(&hash_iter);
+ void *ele_val = BLI_ghashIterator_getValue(&hash_iter);
PyObject *py_key = BPy_BMElem_CreatePyObject(bm, ele_key);
- PyObject *py_val = PyBool_FromLong(*(int *)BMO_OP_SLOT_MAPPING_DATA(ele_val));
+ PyObject *py_val = PyBool_FromLong(*(int *)&ele_val);
PyDict_SetItem(item, py_key, py_val);
Py_DECREF(py_key);