]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
python warning suppress.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 18 Jun 2009 14:28:28 +0000 (14:28 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 18 Jun 2009 14:28:28 +0000 (14:28 +0000)
git-svn-id: file:///svn/unbound/trunk@1672 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
pythonmod/pythonmod.c
pythonmod/pythonmod.h
pythonmod/pythonmod_utils.c

index 4890a52756f45b540ebce643fee46cc2887dff95..7108b98c07156c9c26812a986c9ccc634f4c79da 100644 (file)
@@ -6,6 +6,7 @@
          reply has an NS in the authority but no signatures.  They are
          turned into minimal responses with only the (secure) answer.
        - autoconf 2.63 for configure.
+       - python warnings suppress.  Keep python API away from header files.
 
 17 June 2009: Wouter
        - CREDITS entry for cz.nic, sponsoring a 'summer of code' that was
index fe19bfa25142529712de179919c0d99b24dc4e96..33778a669edfd0e441040a066de0fcbc9644586c 100644 (file)
 #endif
 
 #include "config.h"
+
+#undef _POSIX_C_SOURCE
+#undef _XOPEN_SOURCE
+#include <Python.h>
+
 #include "pythonmod/pythonmod.h"
 #include "util/module.h"
 #include "util/config_file.h"
 #include "pythonmod_utils.h"
-#include <Python.h>
+
+/**
+ * Global state for the module. 
+ */
+struct pythonmod_env {
+
+       /** Python script filename. */
+       const char* fname;
+
+       /** Python module. */
+       PyObject* module;
+
+       /** Module init function */
+       PyObject* func_init;
+       /** Module deinit function */
+       PyObject* func_deinit;
+       /** Module operate function */
+       PyObject* func_operate;
+       /** Module super_inform function */
+       PyObject* func_inform;
+
+       /** Python dictionary. */
+       PyObject* dict;
+
+       /** Module data. */
+       PyObject* data;
+
+       /** Module qstate. */
+       struct module_qstate* qstate;
+};
+
+/**
+ * Per query state for the iterator module.
+ */
+struct pythonmod_qstate {
+
+       /** Module per query data. */
+       PyObject* data;
+};
 
 /* Generated */
 #ifndef S_SPLINT_S
index 2d1f9740f6963f5bc24adacf6887f760a211d46a..fef8067139bf0871a1bdb6bab368bda5bce4e852 100644 (file)
 #define PYTHONMOD_H
 #include "util/module.h"
 #include "services/outbound_list.h"
-#include <Python.h>
-
-struct PyObject;
-#if S_SPLINT_S
-typedef struct PyObject PyObject;
-#endif
-
-/**
- * Global state for the module. 
- */
-struct pythonmod_env {
-
-   /** Python script filename. */
-   const char* fname;
-
-   /** Python module. */
-   PyObject* module;
-
-   /** Module init function */
-   PyObject* func_init;
-   /** Module deinit function */
-   PyObject* func_deinit;
-   /** Module operate function */
-   PyObject* func_operate;
-   /** Module super_inform function */
-   PyObject* func_inform;
-
-   /** Python dictionary. */
-   PyObject* dict;
-
-   /** Module data. */
-   PyObject* data;
-
-   /** Module qstate. */
-   struct module_qstate* qstate;
-};
-
-/**
- * Per query state for the iterator module.
- */
-struct pythonmod_qstate {
-
-   /** Module per query data. */
-   PyObject* data;
-};
 
 /**
  * Get the module function block.
index 93cbb6d5800003242c0b4ca282f2d8173b40a59b..ca383b6995df539ac583f1d04fc374a2729d117f 100644 (file)
@@ -47,6 +47,9 @@
 #include "util/data/msgreply.h"
 #include "util/storage/slabhash.h"
 #include "util/regional.h"
+
+#undef _POSIX_C_SOURCE
+#undef _XOPEN_SOURCE
 #include <Python.h>
 
 /** Store the reply_info and query_info pair in message cache (qstate->msg_cache) */