python: Move some convenience macros to a separate header rather than putting them...
authorJelmer Vernooij <jelmer@samba.org>
Mon, 14 Jan 2008 15:49:19 +0000 (16:49 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 14 Jan 2008 18:53:07 +0000 (19:53 +0100)
(This used to be commit 712274b9bdf524da125cbbe6e4bb475b21b1da66)

source4/pidl/lib/Parse/Pidl/Samba4/Python.pm
source4/scripting/python/pyrpc.h

index 0d5237022ad2f93080f0b6b7b5df9f2982d54c10..84b3405bb9c9b32a90a0bbefa4ef994410f7a4ff 100644 (file)
@@ -886,20 +886,16 @@ sub Parse($$$$$)
 #include <Python.h>
 #include \"librpc/rpc/dcerpc.h\"
 #include \"scripting/python/pytalloc.h\"
+#include \"scripting/python/pyrpc.h\"
 #include \"$hdr\"
 #include \"$ndr_hdr\"
 #include \"$py_hdr\"
 
-#define PY_CHECK_TYPE(type, var, fail) \\
-       if (!type ## _Check(var)) {\\
-               PyErr_Format(PyExc_TypeError, \"Expected type %s\", type ## _Type.tp_name); \\
-               fail; \\
-       }
 ");
 
        foreach my $x (@$ndr) {
-           ($x->{TYPE} eq "INTERFACE") && $self->Interface($x, $basename);
                ($x->{TYPE} eq "IMPORT") && $self->Import(@{$x->{PATHS}});
+           ($x->{TYPE} eq "INTERFACE") && $self->Interface($x, $basename);
        }
        
        $self->pidl("static PyMethodDef $basename\_methods[] = {");
index d7b64dbe9356572eaccd45bbb72b3a812c637cdf..5390c6923da95d29c5fc8da7a3c45970935b1486 100644 (file)
@@ -25,3 +25,5 @@
 
 #define dom_sid2_Type dom_sid_Type
 #define dom_sid28_Type dom_sid_Type
+#define dom_sid2_Check dom_sid_Check
+#define dom_sid28_Check dom_sid28_Check