s4:pyparam: Use C99 initializer for PyGetSetDef
authorAndreas Schneider <asn@samba.org>
Thu, 13 Dec 2018 10:10:40 +0000 (11:10 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 28 Jan 2019 09:29:21 +0000 (10:29 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
source4/param/pyparam.c

index e71bb469eeefec63cc98882716fe347371c92c6b..9801b0cb01a4d3073be379013814513e8df6d007 100644 (file)
@@ -464,10 +464,16 @@ static PyObject *py_lp_ctx_config_file(PyObject *self, void *closure)
 }
 
 static PyGetSetDef py_lp_ctx_getset[] = {
-       { discard_const_p(char, "default_service"), (getter)py_lp_ctx_default_service, NULL, NULL },
-       { discard_const_p(char, "configfile"), (getter)py_lp_ctx_config_file, NULL,
-         discard_const_p(char, "Name of last config file that was loaded.") },
-       { NULL }
+       {
+               .name = discard_const_p(char, "default_service"),
+               .get  = (getter)py_lp_ctx_default_service,
+       },
+       {
+               .name = discard_const_p(char, "configfile"),
+               .get  = (getter)py_lp_ctx_config_file,
+               .doc  = discard_const_p(char, "Name of last config file that was loaded.")
+       },
+       { .name = NULL }
 };
 
 static PyObject *py_lp_ctx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)