[pypy-commit] pypy ffi-backend: Two more tests

arigo noreply at buildbot.pypy.org
Sat Jun 23 17:22:44 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: ffi-backend
Changeset: r55785:0b50203ebb3b
Date: 2012-06-23 16:44 +0200
http://bitbucket.org/pypy/pypy/changeset/0b50203ebb3b/

Log:	Two more tests

diff --git a/pypy/module/_ffi_backend/__init__.py b/pypy/module/_ffi_backend/__init__.py
--- a/pypy/module/_ffi_backend/__init__.py
+++ b/pypy/module/_ffi_backend/__init__.py
@@ -13,6 +13,7 @@
         'new_pointer_type': 'newtype.new_pointer_type',
         'new_array_type': 'newtype.new_array_type',
         'new_struct_type': 'newtype.new_struct_type',
+        'new_union_type': 'newtype.new_union_type',
         'complete_struct_or_union': 'newtype.complete_struct_or_union',
 
         'newp': 'func.newp',
diff --git a/pypy/module/_ffi_backend/newtype.py b/pypy/module/_ffi_backend/newtype.py
--- a/pypy/module/_ffi_backend/newtype.py
+++ b/pypy/module/_ffi_backend/newtype.py
@@ -87,6 +87,10 @@
 def new_struct_type(space, name):
     return ctypeobj.W_CTypeStruct(space, name)
 
+ at unwrap_spec(name=str)
+def new_union_type(space, name):
+    return ctypeobj.W_CTypeUnion(space, name)
+
 @unwrap_spec(ctype=ctypeobj.W_CType, totalsize=int, totalalignment=int)
 def complete_struct_or_union(space, ctype, w_fields, w_ignored=None,
                              totalsize=-1, totalalignment=-1):


More information about the pypy-commit mailing list