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>2007-08-29 07:09:22 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-08-29 07:09:22 +0400
commit1e3b8dc5d716e7fc81f37a94855760680dc7da66 (patch)
tree3dcce91d0d87381ba8a6d28502372ab97f57d8d2 /source/blender/python
parent18478d1e62c39a1adb1f573e340bc14e36c2ed10 (diff)
hash update from stable
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/api2_2x/gen_library.c13
-rw-r--r--source/blender/python/api2_2x/gen_library.h2
2 files changed, 3 insertions, 12 deletions
diff --git a/source/blender/python/api2_2x/gen_library.c b/source/blender/python/api2_2x/gen_library.c
index d73c316d570..8673fefdbb5 100644
--- a/source/blender/python/api2_2x/gen_library.c
+++ b/source/blender/python/api2_2x/gen_library.c
@@ -325,17 +325,8 @@ PyObject *GetPyObjectFromID( ID * id )
Py_RETURN_NONE;
}
-/* return a unique tuple for this libdata*/
-long GenericLib_hash(PyObject * pydata)
+long GenericLib_hash(BPy_GenericLib * pydata)
{
- ID *id = ((BPy_GenericLib *)pydata)->id;
- PyObject *pyhash = PyTuple_New( 2 );
- long hash;
- PyTuple_SetItem( pyhash, 0, PyString_FromString(id->name) );
- if (id->lib) PyTuple_SetItem( pyhash, 1, PyString_FromString(id->lib->name) );
- else PyTuple_SetItem( pyhash, 1, EXPP_incr_ret(Py_None) );
- hash = PyObject_Hash(pyhash);
- Py_DECREF(pyhash);
- return hash;
+ return (long)pydata->id;
}
diff --git a/source/blender/python/api2_2x/gen_library.h b/source/blender/python/api2_2x/gen_library.h
index 74f34fd0019..9fb922619c2 100644
--- a/source/blender/python/api2_2x/gen_library.h
+++ b/source/blender/python/api2_2x/gen_library.h
@@ -90,5 +90,5 @@ short GenericLib_getType(PyObject * pydata);
/* Other ID functions */
ID *GetIdFromList( ListBase * list, char *name );
PyObject *GetPyObjectFromID( ID * id );
-long GenericLib_hash(PyObject * pydata);
+long GenericLib_hash(BPy_GenericLib * pydata);
#endif /* EXPP_gen_library_h */