]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:libcli/pyerrors: add PyErr_NTSTATUS_NOT_OK_RAISE()
authorStefan Metzmacher <metze@samba.org>
Mon, 6 Aug 2012 08:41:31 +0000 (10:41 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 6 Aug 2012 16:06:50 +0000 (18:06 +0200)
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Aug  6 18:06:50 CEST 2012 on sn-devel-104

source4/libcli/util/pyerrors.h

index e3e7bc4aac38cd34042e404ee79b8be6801aa53a..0241e961e5ede38c024849cfd20c077c7df2bffd 100644 (file)
                return NULL; \
        }
 
+#define PyErr_NTSTATUS_NOT_OK_RAISE(status) \
+       if (!NT_STATUS_IS_OK(status)) { \
+               PyErr_SetNTSTATUS(status); \
+               return NULL; \
+       }
+
 #define PyErr_WERROR_NOT_OK_RAISE(status) \
        if (!W_ERROR_IS_OK(status)) { \
                PyErr_SetWERROR(status); \