Author: Armin Rigo <ar...@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) +@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): _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit