]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:libsmb: Use C99 initializer for py_cli_notify_state_methods
authorAndreas Schneider <asn@samba.org>
Mon, 1 Feb 2021 18:49:18 +0000 (19:49 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 1 Feb 2021 21:50:32 +0000 (21:50 +0000)
error: missing field 'ml_meth' initializer [-Werror,-Wmissing-field-initializers]
        { NULL }
               ^

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/pylibsmb.c

index 510dd3185d850b3326521baaeb289d6d7b108d83..45abbec14d2d52f66eab60802b76dfaf2a09c864 100644 (file)
@@ -1344,18 +1344,22 @@ static PyObject *py_cli_notify_get_changes(struct py_cli_notify_state *self,
 }
 
 static PyMethodDef py_cli_notify_state_methods[] = {
-       { "get_changes",
-         (PyCFunction)py_cli_notify_get_changes,
-         METH_VARARGS|METH_KEYWORDS,
-         "Wait for change notifications: \n"
-         "N.get_changes(wait=BOOLEAN) -> "
-         "change notifications as a dictionary\n"
-         "\t\tList contents of a directory. The keys are, \n"
-         "\t\t\tname: name of changed object\n"
-         "\t\t\taction: type of the change\n"
-         "None is returned if there's no response jet and wait=False is passed"
+       {
+               .ml_name = "get_changes",
+               .ml_meth = (PyCFunction)py_cli_notify_get_changes,
+               .ml_flags = METH_VARARGS|METH_KEYWORDS,
+               .ml_doc  = "Wait for change notifications: \n"
+                          "N.get_changes(wait=BOOLEAN) -> "
+                          "change notifications as a dictionary\n"
+                          "\t\tList contents of a directory. The keys are, \n"
+                          "\t\t\tname: name of changed object\n"
+                          "\t\t\taction: type of the change\n"
+                          "None is returned if there's no response jet and "
+                          "wait=False is passed"
        },
-       { NULL }
+       {
+               .ml_name = NULL
+       }
 };
 
 static PyTypeObject py_cli_notify_state_type = {