summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/glibext/storage.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pychrysalide/glibext/storage.c')
-rw-r--r--plugins/pychrysalide/glibext/storage.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/plugins/pychrysalide/glibext/storage.c b/plugins/pychrysalide/glibext/storage.c
index 4764700..f2962bf 100644
--- a/plugins/pychrysalide/glibext/storage.c
+++ b/plugins/pychrysalide/glibext/storage.c
@@ -309,32 +309,34 @@ static PyObject *py_object_storage_load_object(PyObject *self, PyObject *args)
static PyObject *py_object_storage_unpack_object(PyObject *self, PyObject *args)
{
PyObject *result; /* Bilan à retourner */
- const char *name; /* Désignation de groupe #0 */
- const char *target_name; /* Désignation de groupe #1 */
+ int fd; /* Flux de fonnées courant */
+ const char *name; /* Désignation de groupe */
int ret; /* Bilan de lecture des args. */
GObjectStorage *storage; /* Mécanismes natifs */
GSerializableObject *object; /* Objet reconstruit ou NULL */
#define OBJECT_STORAGE_UNPACK_OBJECT_METHOD PYTHON_METHOD_DEF \
( \
- unpack_object, "$self, name, target_name, /", \
+ unpack_object, "$self, fd, name, /", \
METH_VARARGS, py_object_storage, \
"Load an object from a reference to serialized data.\n" \
"\n" \
- "The *name* is a string label for the group containing a position" \
- " pointing to a target object to load. The *target_name* is a" \
- " string label for the group of this target object.\n" \
+ "The *fd* argument is a file descriptor pointing to the data" \
+ " stream for a current object being restored. A reference to" \
+ " another object belonging to a group pointed by the string *name*" \
+ " should be available at the current read position for this data" \
+ " stream.\n" \
"\n" \
"The result is a pychrysalide.analysis.storage.SerializableObject" \
" instancet in case of success, or *None* in case of failure." \
)
- ret = PyArg_ParseTuple(args, "sO&", &name, &target_name);
+ ret = PyArg_ParseTuple(args, "is", &fd, &name);
if (!ret) return NULL;
storage = G_OBJECT_STORAGE(pygobject_get(self));
- object = g_object_storage_unpack_object(storage, name, target_name);
+ object = g_object_storage_unpack_object(storage, fd, name);
if (object != NULL)
result = pygobject_new(G_OBJECT(object));