[pypy-commit] cffi default: Show <ctype 'FILE'> instead of <ctype 'struct _IO_FILE'>
arigo
noreply at buildbot.pypy.org
Tue Nov 3 03:24:06 EST 2015
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r2370:2d96d742f41f
Date: 2015-11-03 09:07 +0100
http://bitbucket.org/cffi/cffi/changeset/2d96d742f41f/
Log: Show <ctype 'FILE'> instead of <ctype 'struct _IO_FILE'>
diff --git a/c/realize_c_type.c b/c/realize_c_type.c
--- a/c/realize_c_type.c
+++ b/c/realize_c_type.c
@@ -318,7 +318,7 @@
/* returns a single global cached opaque type */
static PyObject *file_struct = NULL;
if (file_struct == NULL)
- file_struct = new_struct_or_union_type("struct _IO_FILE",
+ file_struct = new_struct_or_union_type("FILE",
CT_STRUCT | CT_IS_FILE);
Py_XINCREF(file_struct);
return file_struct;
diff --git a/testing/cffi1/test_ffi_obj.py b/testing/cffi1/test_ffi_obj.py
--- a/testing/cffi1/test_ffi_obj.py
+++ b/testing/cffi1/test_ffi_obj.py
@@ -404,7 +404,7 @@
def test_FILE_issue228():
fntype1 = _cffi1_backend.FFI().typeof("FILE *")
fntype2 = _cffi1_backend.FFI().typeof("FILE *")
- assert repr(fntype1) == "<ctype 'struct _IO_FILE *'>"
+ assert repr(fntype1) == "<ctype 'FILE *'>"
assert fntype1 is fntype2
def test_cast_from_int_type_to_bool():
More information about the pypy-commit
mailing list