Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r92358:ff810e9e706d
Date: 2017-09-08 17:21 +0200
http://bitbucket.org/pypy/pypy/changeset/ff810e9e706d/

Log:    hg merge py_ssize_t

        PR #568 (asottile)

        Trying to use another "#define Signed", together with "#pragma
        once", to make the cgo tool more happy. Might be reverted if
        "#pragma once" turns out not to work appropriately in all cases.

diff --git a/pypy/module/cpyext/api.py b/pypy/module/cpyext/api.py
--- a/pypy/module/cpyext/api.py
+++ b/pypy/module/cpyext/api.py
@@ -1229,7 +1229,8 @@
 #  error "PyPy does not support 64-bit on Windows.  Use Win32"
 #endif
 ''',
-        '#define Signed   long           /* xxx temporary fix */',
+        '#include "cpyext_object.h"',
+        '#define Signed   Py_ssize_t     /* xxx temporary fix */',
         '#define Unsigned unsigned long  /* xxx temporary fix */',
         '',] + decls + [
         '',
diff --git a/pypy/module/cpyext/parse/cpyext_object.h 
b/pypy/module/cpyext/parse/cpyext_object.h
--- a/pypy/module/cpyext/parse/cpyext_object.h
+++ b/pypy/module/cpyext/parse/cpyext_object.h
@@ -1,3 +1,4 @@
+#pragma once
 
 typedef long Py_ssize_t;
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to