summaryrefslogtreecommitdiffstats
path: root/source3/python/py_spoolss_printers_conv.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-05-14 07:09:54 +0000
committerTim Potter <tpot@samba.org>2002-05-14 07:09:54 +0000
commitceb338a35c80f1ddd8965b19bdbde5e870107fb7 (patch)
tree1a57b59532d2aedaaf5c41127e5b406dbe1426d8 /source3/python/py_spoolss_printers_conv.c
parent3d95426f2c88b4bc3914d8bf894c990039db7ea5 (diff)
downloadsamba-ceb338a35c80f1ddd8965b19bdbde5e870107fb7.tar.gz
samba-ceb338a35c80f1ddd8965b19bdbde5e870107fb7.tar.xz
samba-ceb338a35c80f1ddd8965b19bdbde5e870107fb7.zip
Moved PyDict_SetItemString for printer info level structures into conv functions.
(This used to be commit f7fadfdd73d3ba12dbfc7bf18319ce72f79a0dcc)
Diffstat (limited to 'source3/python/py_spoolss_printers_conv.c')
-rw-r--r--source3/python/py_spoolss_printers_conv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/python/py_spoolss_printers_conv.c b/source3/python/py_spoolss_printers_conv.c
index 89980ef25a9..b20382922cc 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;
}