diff options
author | Tim Potter <tpot@samba.org> | 2002-05-14 07:09:54 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-05-14 07:09:54 +0000 |
commit | ceb338a35c80f1ddd8965b19bdbde5e870107fb7 (patch) | |
tree | 1a57b59532d2aedaaf5c41127e5b406dbe1426d8 /source3 | |
parent | 3d95426f2c88b4bc3914d8bf894c990039db7ea5 (diff) | |
download | samba-ceb338a35c80f1ddd8965b19bdbde5e870107fb7.tar.gz samba-ceb338a35c80f1ddd8965b19bdbde5e870107fb7.tar.bz2 samba-ceb338a35c80f1ddd8965b19bdbde5e870107fb7.zip |
Moved PyDict_SetItemString for printer info level structures into conv functions.
(This used to be commit f7fadfdd73d3ba12dbfc7bf18319ce72f79a0dcc)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/python/py_spoolss_printers.c | 2 | ||||
-rw-r--r-- | source3/python/py_spoolss_printers_conv.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/source3/python/py_spoolss_printers.c b/source3/python/py_spoolss_printers.c index 17c8af902a..d20b144502 100644 --- a/source3/python/py_spoolss_printers.c +++ b/source3/python/py_spoolss_printers.c @@ -170,8 +170,6 @@ PyObject *spoolss_getprinter(PyObject *self, PyObject *args, PyObject *kw) break; } - PyDict_SetItemString(result, "level", PyInt_FromLong(level)); - Py_INCREF(result); return result; } diff --git a/source3/python/py_spoolss_printers_conv.c b/source3/python/py_spoolss_printers_conv.c index 89980ef25a..b20382922c 100644 --- a/source3/python/py_spoolss_printers_conv.c +++ b/source3/python/py_spoolss_printers_conv.c @@ -181,6 +181,7 @@ BOOL py_to_DEVICEMODE(DEVICEMODE *devmode, PyObject *dict) BOOL py_from_PRINTER_INFO_0(PyObject **dict, PRINTER_INFO_0 *info) { *dict = from_struct(info, py_PRINTER_INFO_0); + PyDict_SetItemString(*dict, "level", PyInt_FromLong(0)); return True; } @@ -196,6 +197,7 @@ BOOL py_to_PRINTER_INFO_0(PRINTER_INFO_0 *info, PyObject *dict) BOOL py_from_PRINTER_INFO_1(PyObject **dict, PRINTER_INFO_1 *info) { *dict = from_struct(info, py_PRINTER_INFO_1); + PyDict_SetItemString(*dict, "level", PyInt_FromLong(1)); return True; } @@ -220,6 +222,8 @@ BOOL py_from_PRINTER_INFO_2(PyObject **dict, PRINTER_INFO_2 *info) if (py_from_DEVICEMODE(&obj, info->devmode)) PyDict_SetItemString(*dict, "device_mode", obj); + PyDict_SetItemString(*dict, "level", PyInt_FromLong(2)); + return True; } @@ -260,6 +264,8 @@ BOOL py_from_PRINTER_INFO_3(PyObject **dict, PRINTER_INFO_3 *info) if (py_from_SECDESC(&obj, info->secdesc)) PyDict_SetItemString(*dict, "security_descriptor", obj); + PyDict_SetItemString(*dict, "level", PyInt_FromLong(3)); + return True; } |