the structure were present in the dictionary.
/* Convert a Python dict to a structure */
-void to_struct(void *s, PyObject *dict, struct pyconv *conv)
+BOOL to_struct(void *s, PyObject *dict, struct pyconv *conv)
{
int i;
PyObject *obj;
obj = PyDict_GetItemString(dict, conv[i].name);
+
+ if (!obj)
+ return False;
switch (conv[i].type) {
case PY_UNISTR: {
break;
}
}
+
+ return True;
}
};
PyObject *from_struct(void *s, struct pyconv *conv);
-void to_struct(void *s, PyObject *dict, struct pyconv *conv);
+BOOL to_struct(void *s, PyObject *dict, struct pyconv *conv);
/* Another version of offsetof (-: */