static PyObject * pytdbpack_str_850(PyObject *val_iter, PyObject *packed_list);
static PyObject * pytdbpack_buffer(PyObject *val_iter, PyObject *packed_list);
-static PyObject *pytdbpack_unpack_item(char, char **pbuf, int *plen, PyObject *);
+static PyObject *pytdbunpack_item(char, char **pbuf, int *plen, PyObject *);
static PyObject *pytdbpack_data(const char *format_str,
PyObject *val_seq,
";
-static char const pytdbpack_unpack_doc[] =
+static char const pytdbunpack_doc[] =
"unpack(format, buffer) -> (values, rest)
Unpack Samba binary data according to format string.
static PyObject *
-pytdbpack_unpack(PyObject *self,
+pytdbunpack(PyObject *self,
PyObject *args)
{
char *format_str, *packed_str, *ppacked;
for (ppacked = packed_str, i = 0; i < format_len && format_str[i] != '$'; i++) {
last_format = format_str[i];
/* packed_len is reduced in place */
- if (!pytdbpack_unpack_item(format_str[i], &ppacked, &packed_len, val_list))
+ if (!pytdbunpack_item(format_str[i], &ppacked, &packed_len, val_list))
goto failed;
}
return NULL;
}
while (packed_len > 0)
- if (!pytdbpack_unpack_item(last_format, &ppacked, &packed_len, val_list))
+ if (!pytdbunpack_item(last_format, &ppacked, &packed_len, val_list))
goto failed;
}
Returns a reference to None, or NULL for failure.
*/
-static PyObject *pytdbpack_unpack_item(char ch,
+static PyObject *pytdbunpack_item(char ch,
char **pbuf,
int *plen,
PyObject *val_list)
static PyMethodDef pytdbpack_methods[] = {
{ "pack", pytdbpack, METH_VARARGS, (char *) pytdbpack_doc },
- { "unpack", pytdbpack_unpack, METH_VARARGS, (char *) pytdbpack_unpack_doc },
+ { "unpack", pytdbunpack, METH_VARARGS, (char *) pytdbunpack_doc },
};
DL_EXPORT(void)