From: Andreas Schneider Date: Mon, 1 Feb 2021 18:49:18 +0000 (+0100) Subject: s3:libsmb: Use C99 initializer for py_cli_notify_state_methods X-Git-Tag: tevent-0.11.0~1851 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=878b4a71aa9c97ef247feccf9c4ea818d33d62d6;p=thirdparty%2Fsamba.git s3:libsmb: Use C99 initializer for py_cli_notify_state_methods error: missing field 'ml_meth' initializer [-Werror,-Wmissing-field-initializers] { NULL } ^ Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison --- diff --git a/source3/libsmb/pylibsmb.c b/source3/libsmb/pylibsmb.c index 510dd3185d8..45abbec14d2 100644 --- a/source3/libsmb/pylibsmb.c +++ b/source3/libsmb/pylibsmb.c @@ -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 = {