]> git.michaelhowe.org Git - packages/b/bup.git/commitdiff
Move _helper.c's Python.h back up (now to the top), because Python.
authorRob Browning <rlb@defaultvalue.org>
Mon, 23 Sep 2013 00:18:24 +0000 (19:18 -0500)
committerRob Browning <rlb@defaultvalue.org>
Mon, 23 Sep 2013 00:18:28 +0000 (19:18 -0500)
Move the Python.h include in _helper.c to the top because Python says
so:

  http://docs.python.org/2/c-api/intro.html#include-files

Though according to this, it's been fixed upstream:

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=206805

Which might explain why I didn't see the problem here.

Thanks to Chandan Kumar <chandank.kumar@gmail.com> for the report.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/_helpers.c

index fe485119b68b2b3c288472e414d95d86f6cf2497..de8f6f27acbc15e2d4a35bf1363f44f51b5ee46f 100644 (file)
@@ -2,6 +2,11 @@
 #define PY_SSIZE_T_CLEAN 1
 #undef NDEBUG
 #include "../../config/config.h"
+
+// According to Python, its header has to go first:
+//   http://docs.python.org/2/c-api/intro.html#include-files
+#include <Python.h>
+
 #include <assert.h>
 #include <errno.h>
 #include <fcntl.h>
@@ -29,7 +34,6 @@
 #endif
 
 #include "bupsplit.h"
-#include <Python.h>
 
 #if defined(FS_IOC_GETFLAGS) && defined(FS_IOC_SETFLAGS)
 #define BUP_HAVE_FILE_ATTRS 1