[pypy-commit] pypy cpyext-ext: tweak
mattip
pypy.commits at gmail.com
Fri Mar 18 08:50:27 EDT 2016
Author: mattip <matti.picus at gmail.com>
Branch: cpyext-ext
Changeset: r83129:a59464aa579d
Date: 2016-03-18 14:49 +0200
http://bitbucket.org/pypy/pypy/changeset/a59464aa579d/
Log: tweak
diff --git a/pypy/module/cpyext/bytesobject.py b/pypy/module/cpyext/bytesobject.py
--- a/pypy/module/cpyext/bytesobject.py
+++ b/pypy/module/cpyext/bytesobject.py
@@ -2,7 +2,7 @@
from rpython.rtyper.lltypesystem import rffi, lltype
from pypy.module.cpyext.api import (
cpython_api, cpython_struct, bootstrap_function, build_type_checkers,
- PyObjectFields, Py_ssize_t, CONST_STRING, CANNOT_FAIL)
+ PyObjectFields, PyVarObjectFields, Py_ssize_t, CONST_STRING, CANNOT_FAIL)
from pypy.module.cpyext.pyerrors import PyErr_BadArgument
from pypy.module.cpyext.pyobject import (
PyObject, PyObjectP, Py_DecRef, make_ref, from_ref, track_reference,
@@ -52,9 +52,8 @@
PyStringObjectStruct = lltype.ForwardReference()
PyStringObject = lltype.Ptr(PyStringObjectStruct)
-PyStringObjectFields = PyObjectFields + \
- (("ob_size", Py_ssize_t), ("ob_shash", rffi.LONG),
- ("ob_sstate", rffi.INT), ("buffer", rffi.CCHARP))
+PyStringObjectFields = PyVarObjectFields + \
+ (("ob_shash", rffi.LONG), ("ob_sstate", rffi.INT), ("buffer", rffi.CCHARP))
cpython_struct("PyStringObject", PyStringObjectFields, PyStringObjectStruct)
@bootstrap_function
diff --git a/pypy/module/cpyext/object.py b/pypy/module/cpyext/object.py
--- a/pypy/module/cpyext/object.py
+++ b/pypy/module/cpyext/object.py
@@ -297,7 +297,7 @@
@cpython_api([PyObject], PyObject)
def PyObject_SelfIter(space, ref):
- """Undocumented function, this is wat CPython does."""
+ """Undocumented function, this is what CPython does."""
Py_IncRef(space, ref)
return ref
More information about the pypy-commit
mailing list