[PATCH] manifest: include Python.h before standard headers

Drew Gottlieb drgott at google.com
Wed Mar 18 18:42:06 UTC 2015


# HG changeset patch
# User Drew Gottlieb <drgott at google.com>
# Date 1426704096 25200
#      Wed Mar 18 11:41:36 2015 -0700
# Node ID 134a586a0b3839d85ff3e6a3a35c64b09dc493d0
# Parent  b7f936f47f2b104a60840bae571e009742126afc
manifest: include Python.h before standard headers

Python.h should be included before any standard headers according to the
python docs: https://docs.python.org/2/c-api/intro.html#include-files

diff --git a/mercurial/manifest.c b/mercurial/manifest.c
--- a/mercurial/manifest.c
+++ b/mercurial/manifest.c
@@ -6,12 +6,12 @@
  * This software may be used and distributed according to the terms of
  * the GNU General Public License, incorporated herein by reference.
  */
+#include <Python.h>
+
 #include <assert.h>
 #include <string.h>
 #include <stdlib.h>
 
-#include <Python.h>
-
 /* VC9 doesn't include bool and lacks stdbool.h based on my searching */
 #ifdef _MSC_VER
 #define true 1


More information about the Mercurial-devel mailing list