]> eyrie.org Git - kerberos/perl-kerberos.git/commitdiff
Move CROAK_NULL and CROAK_NULL_SELF macros to util/util.h
authorRuss Allbery <eagle@eyrie.org>
Thu, 6 Mar 2014 21:10:52 +0000 (13:10 -0800)
committerRuss Allbery <eagle@eyrie.org>
Thu, 6 Mar 2014 21:10:52 +0000 (13:10 -0800)
These macros will be used in Authen::Kerberos as well.

lib/Authen/Kerberos/Kadmin.xs
util/util.h

index 23dbef3de27e590e7998bf85ab543228ca77498d..41b802e5a79f9227023de6f6a7845766a4a881bc 100644 (file)
@@ -52,14 +52,6 @@ typedef struct {
     bool quality;
 } *Authen__Kerberos__Kadmin;
 
-/* Used to check that an object argument to a function is not NULL. */
-#define CROAK_NULL(o, t, f)                     \
-    do {                                        \
-        if ((o) == NULL)                        \
-            croak(t " object is undef in " f);  \
-    } while (0);
-#define CROAK_NULL_SELF(o, t, f) CROAK_NULL((o), t, t "::" f)
-
 
 /* XS code below this point. */
 
index 0312fdbed28d6e479f97bda961b87ebad687388d..aa9ac6c6571722242805f59194928c7fd1fd8447 100644 (file)
 #include <krb5.h>               /* krb5_contxt, krb5_error_code */
 #include <perl.h>               /* bool */
 
+/* Used to check that an object argument to a function is not NULL. */
+#define CROAK_NULL(o, t, f)                     \
+    do {                                        \
+        if ((o) == NULL)                        \
+            croak(t " object is undef in " f);  \
+    } while (0);
+#define CROAK_NULL_SELF(o, t, f) CROAK_NULL((o), t, t "::" f)
+
 BEGIN_DECLS
 
 /* Default to a hidden visibility for all util functions. */