Patchwork [4,of,6] bdiff: include util.h

login
register
mail settings
Submitter Gregory Szorc
Date Oct. 13, 2016, 7:44 p.m.
Message ID <569eb5b02fff32b0517c.1476387856@gps-mbp.local>
Download mbox | patch
Permalink /patch/17062/
State Accepted
Headers show

Comments

Gregory Szorc - Oct. 13, 2016, 7:44 p.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1476358034 -7200
#      Thu Oct 13 13:27:14 2016 +0200
# Node ID 569eb5b02fff32b0517c4c1d5ef8fb82dab33023
# Parent  b9e9955e74842914d77b892fed7a0ff3a4f2d85e
bdiff: include util.h

Without this, IS_PY3K isn't define and the preprocessor uses the
incorrect module loading code, causing the module fail to load at
run-time.

After this patch, all our C extensions (except for watchman's) appear
to import correctly in Python 3!

Patch

diff --git a/mercurial/bdiff_module.c b/mercurial/bdiff_module.c
--- a/mercurial/bdiff_module.c
+++ b/mercurial/bdiff_module.c
@@ -16,8 +16,9 @@ 
 #include <limits.h>
 
 #include "bdiff.h"
 #include "bitmanipulation.h"
+#include "util.h"
 
 
 static PyObject *blocks(PyObject *self, PyObject *args)
 {