From: jek-cythonhg@kleckner.net Date: Fri, 23 May 2008 21:42:06 +0000 (-0700) Subject: Patches to make Windows port work with Python 2.6a3 X-Git-Tag: 0.9.8rc1~11^2~11 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8e01c45db39c770de559d1fdf6be782fd59d6c10;p=cython.git Patches to make Windows port work with Python 2.6a3 Cython/Compiler/Errors.py: Needed the self.message removed because of deprecation in BaseException. tests/compile/food.h: Converted line endings from Mac to Unix since VS2008 compiler fails with Mac text files. tests/compile/belchenko1.pyx: Changed cdef extern to eliminate math.h since it doesn't exist on Windoze. This needs to be reviewed since it isn't clear if the test needs to build the lib with math.h or whether it is just testing the compiler (which wouldn't read math.h anyway). --- diff --git a/Cython/Compiler/Errors.py b/Cython/Compiler/Errors.py index 4c9e7981..84a69dee 100644 --- a/Cython/Compiler/Errors.py +++ b/Cython/Compiler/Errors.py @@ -27,7 +27,8 @@ class CompileError(PyrexError): def __init__(self, position = None, message = ""): self.position = position - self.message = message + # Deprecated and withdrawn in 2.6: + # self.message = message if position: pos_str = "%s:%d:%d: " % (position[0].get_description(), position[1], position[2]) cont = context(position) @@ -40,7 +41,8 @@ class CompileWarning(PyrexWarning): def __init__(self, position = None, message = ""): self.position = position - self.message = message + # Deprecated and withdrawn in 2.6: + # self.message = message if position: pos_str = "%s:%d:%d: " % (position[0].get_description(), position[1], position[2]) else: diff --git a/tests/compile/belchenko1.pyx b/tests/compile/belchenko1.pyx index bae543a1..d6905f86 100644 --- a/tests/compile/belchenko1.pyx +++ b/tests/compile/belchenko1.pyx @@ -1,4 +1,4 @@ -cdef extern from "stdint.h": +cdef extern from *: ctypedef int intptr_t cdef int _is_aligned(void *ptr): diff --git a/tests/compile/food.h b/tests/compile/food.h index 00af7f47..9103c10b 100644 --- a/tests/compile/food.h +++ b/tests/compile/food.h @@ -1 +1,8 @@ -struct Tomato { PyObject_HEAD }; struct Bicycle{ PyObject_HEAD }; \ No newline at end of file +struct Tomato { + PyObject_HEAD +}; + +struct Bicycle{ + PyObject_HEAD +}; +