Dan Villiom Podlaski Christiansen avatar Dan Villiom Podlaski Christiansen committed 1914d43

New patches; rebased.

Comments (0)

Files changed (6)

+# HG changeset patch
+# Parent 392562899d0b0de77d247b88a9190ab91cb61995
+# User Dan Villiom Podlaski Christiansen <danchr@gmail.com>
+Add "bytesobject.h" header, copied from CPython 2.7.
+
+Functions not provided by PyPy are commented out.
+
+diff --git a/pypy/module/cpyext/include/Python.h b/pypy/module/cpyext/include/Python.h
+--- a/pypy/module/cpyext/include/Python.h
++++ b/pypy/module/cpyext/include/Python.h
+@@ -119,6 +119,7 @@ typedef long Py_ssize_t;
+ #include "pycobject.h"
+ #include "pycapsule.h"
+ #include "bufferobject.h"
++#include "bytesobject.h"
+ #include "sliceobject.h"
+ #include "datetime.h"
+ #include "pystate.h"
+diff --git a/pypy/module/cpyext/include/bytesobject.h b/pypy/module/cpyext/include/bytesobject.h
+new file mode 100644
+--- /dev/null
++++ b/pypy/module/cpyext/include/bytesobject.h
+@@ -0,0 +1,27 @@
++#define PyBytesObject PyStringObject
++#define PyBytes_Type PyString_Type
++
++#define PyBytes_Check PyString_Check
++#define PyBytes_CheckExact PyString_CheckExact
++//#define PyBytes_CHECK_INTERNED PyString_CHECK_INTERNED
++#define PyBytes_AS_STRING PyString_AS_STRING
++#define PyBytes_GET_SIZE PyString_GET_SIZE
++#define Py_TPFLAGS_BYTES_SUBCLASS Py_TPFLAGS_STRING_SUBCLASS
++
++#define PyBytes_FromStringAndSize PyString_FromStringAndSize
++#define PyBytes_FromString PyString_FromString
++#define PyBytes_FromFormatV PyString_FromFormatV
++#define PyBytes_FromFormat PyString_FromFormat
++#define PyBytes_Size PyString_Size
++#define PyBytes_AsString PyString_AsString
++//#define PyBytes_Repr PyString_Repr
++#define PyBytes_Concat PyString_Concat
++#define PyBytes_ConcatAndDel PyString_ConcatAndDel
++//#define _PyBytes_Resize _PyString_Resize
++//#define _PyBytes_Eq _PyString_Eq
++#define PyBytes_Format PyString_Format
++//#define _PyBytes_FormatLong _PyString_FormatLong
++//#define PyBytes_DecodeEscape PyString_DecodeEscape
++//#define _PyBytes_Join _PyString_Join
++#define PyBytes_AsStringAndSize PyString_AsStringAndSize
++//#define _PyBytes_InsertThousandsGrouping _PyString_InsertThousandsGrouping
 # HG changeset patch
 # User Dan Villiom Podlaski Christiansen <danchr@gmail.com>
 # Date 1291027470 -3600
-# Node ID 7004494047640dd48cbd1152420dd94415a27466
-# Parent  c337b108282a4ce43804f21bb000027d31d1238c
+# Node ID 2464ffc6a6ea16b30712645f1e5e481bf890c051
+# Parent  51aa0f0e4cf2199ab10e5436d86091ab46f07566
 don't search MacPorts & Fink by default.
 
 diff --git a/pypy/translator/platform/darwin.py b/pypy/translator/platform/darwin.py
 --- a/pypy/translator/platform/darwin.py
 +++ b/pypy/translator/platform/darwin.py
-@@ -29,14 +29,10 @@ class Darwin(posix.BasePosix):
+@@ -31,14 +31,10 @@ class Darwin(posix.BasePosix):
      
      def _preprocess_include_dirs(self, include_dirs):
          res_incl_dirs = list(include_dirs)
+# HG changeset patch
+# Parent f20d00165f8821ae5e86de36c02a44607ce513d3
+# User Dan Villiom Podlaski Christiansen  <danchr@gmail.com>
+Hack to fix translation on Darwin
+
+diff --git a/pypy/translator/platform/posix.py b/pypy/translator/platform/posix.py
+--- a/pypy/translator/platform/posix.py
++++ b/pypy/translator/platform/posix.py
+@@ -20,7 +20,9 @@ class BasePosix(Platform):
+         self.cc = cc
+ 
+     def _libs(self, libraries):
+-        return ['-l%s' % lib for lib in libraries]
++        # FIXME: using -reexport-l instead of -l is arguably incorrect, but
++        # allows RFFI to continue pointlessly reexporting imported symbols
++        return ['-reexport‐l%s' % lib for lib in libraries]
+ 
+     def _libdirs(self, library_dirs):
+         return ['-L%s' % ldir for ldir in library_dirs]
+reexport.diff
+bytes.diff
 no-macports.diff
 visibility.diff
 test-kwargs.diff
-sem_t.diff
+sem_t.diff #+broken
 database-sentinels.diff
 w_star-doc.diff
 # HG changeset patch
 # User Dan Villiom Podlaski Christiansen <danchr@gmail.com>
 # Date 1291559310 -3600
-# Node ID 72a837f1336cfe806adb3a80b6a4942f8fae7a5f
-# Parent  a76f4fb1b9b4061f1537d4e8b2b35b69a208f953
+# Node ID 6a8754119de51b5f687c6eabce17ce720de5ad56
+# Parent  acdb39c5d553bd16830e54be061f7beeaf59463a
 Test METH_KEYWORDS in the cpyext tests.
 
 diff --git a/pypy/module/cpyext/test/test_getargs.py b/pypy/module/cpyext/test/test_getargs.py
 # HG changeset patch
 # User Dan Villiom Podlaski Christiansen <danchr@gmail.com>
 # Date 1291299495 -3600
-# Node ID 117eeca2ec7f701ae8fa67d3597785b99bf148f4
-# Parent  7004494047640dd48cbd1152420dd94415a27466
+# Node ID acdb39c5d553bd16830e54be061f7beeaf59463a
+# Parent  2464ffc6a6ea16b30712645f1e5e481bf890c051
 Make symbols hidden by default.
 
 diff --git a/pypy/module/cpyext/include/Python.h b/pypy/module/cpyext/include/Python.h
 --- a/pypy/module/cpyext/include/Python.h
 +++ b/pypy/module/cpyext/include/Python.h
-@@ -9,8 +9,13 @@
- # include <limits.h>
- # include <math.h>
+@@ -11,8 +11,13 @@
+ # include <errno.h>
+ # include <unistd.h>
  # define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
 -# define PyAPI_FUNC(RTYPE) RTYPE
 -# define PyAPI_DATA(RTYPE) extern RTYPE
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.