forked from bartvdbraak/blender
hash update from stable
This commit is contained in:
parent
18478d1e62
commit
1e3b8dc5d7
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user