[pypy-commit] cffi default: Fix the front-end to work (but still show $ signs)
arigo
noreply at buildbot.pypy.org
Wed Jun 19 10:17:35 CEST 2013
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r1272:613cd8c50b9f
Date: 2013-06-19 09:50 +0200
http://bitbucket.org/cffi/cffi/changeset/613cd8c50b9f/
Log: Fix the front-end to work (but still show $ signs)
diff --git a/cffi/backend_ctypes.py b/cffi/backend_ctypes.py
--- a/cffi/backend_ctypes.py
+++ b/cffi/backend_ctypes.py
@@ -707,7 +707,7 @@
class CTypesStructOrUnion(CTypesBaseStructOrUnion):
__slots__ = ['_blob']
_ctype = struct_or_union
- _reftypename = '%s %s &' % (kind, name)
+ _reftypename = '%s &' % (name,)
_kind = kind
#
CTypesStructOrUnion._fix_class()
diff --git a/cffi/model.py b/cffi/model.py
--- a/cffi/model.py
+++ b/cffi/model.py
@@ -357,7 +357,8 @@
def build_backend_type(self, ffi, finishlist):
self.check_not_partial()
finishlist.append(self)
- return global_cache(self, ffi, 'new_struct_type', self.name, key=self)
+ return global_cache(self, ffi, 'new_struct_type',
+ 'struct ' + self.name, key=self)
class UnionType(StructOrUnion):
@@ -365,7 +366,8 @@
def build_backend_type(self, ffi, finishlist):
finishlist.append(self)
- return global_cache(self, ffi, 'new_union_type', self.name, key=self)
+ return global_cache(self, ffi, 'new_union_type',
+ 'union ' + self.name, key=self)
class EnumType(StructOrUnionOrEnum):
More information about the pypy-commit
mailing list