Author: Ronan Lamy <ronan.l...@gmail.com>
Branch: py3k
Changeset: r85317:ed21d8456ad2
Date: 2016-06-21 19:13 +0100
http://bitbucket.org/pypy/pypy/changeset/ed21d8456ad2/

Log:    manually merge default's stringobject.h changes to bytesobject.h

diff --git a/pypy/module/cpyext/include/bytesobject.h 
b/pypy/module/cpyext/include/bytesobject.h
--- a/pypy/module/cpyext/include/bytesobject.h
+++ b/pypy/module/cpyext/include/bytesobject.h
@@ -9,7 +9,6 @@
 #include <stdarg.h>
 
 #define PyBytes_GET_SIZE(op) PyBytes_Size(op)
-#define PyBytes_AS_STRING(op) PyBytes_AsString(op)
 
 /*
 Type PyStringObject represents a character string.  An extra zero byte is
@@ -35,24 +34,20 @@
    Together, these sped cpython up by up to 20%, and since they are part of the
    "public" interface PyPy must reimpliment them. */
 
-
-
 typedef struct {
     PyObject_VAR_HEAD
     long ob_shash;
     int ob_sstate;
-    char * buffer; /* change the name from cpython so all non-api c access is 
thwarted */
+    char ob_sval[1]; 
 
     /* Invariants 
-     * (not relevant in PyPy, all stringobjects are backed by a pypy object)
-     *     buffer contains space for 'ob_size+1' elements.
-     *     buffer[ob_size] == 0.
+     *     ob_sval contains space for 'ob_size+1' elements.
+     *     ob_sval[ob_size] == 0.
      *     ob_shash is the hash of the string or -1 if not computed yet.
      *     ob_sstate != 0 iff the string object is in stringobject.c's
      *       'interned' dictionary; in this case the two references
      *       from 'interned' to this object are *not counted* in ob_refcnt.
      */
-
 } PyBytesObject;
 
 #define SSTATE_NOT_INTERNED 0
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to