Overview
Request 446585 accepted
- update to version 1.9.1:
(no changelog available)
- changes from version 1.9:
* Structs with variable-sized arrays as their last field: now we
track the length of the array after ffi.new() is called, just like
we always tracked the length of ffi.new("int[]", 42). This lets us
detect out-of-range accesses to array items. This also lets us
display a better repr(), and have the total size returned by
ffi.sizeof() and ffi.buffer(). Previously both functions would
return a result based on the size of the declared structure type,
with an assumed empty array. (Thanks andrew for starting this
refactoring.)
* Add support in cdef()/set_source() for unspecified-length arrays
in typedefs: typedef int foo_t[...];. It was already supported for
global variables or structure fields.
* I turned in v1.8 a warning from cffi/model.py into an error: 'enum
xxx' has no values explicitly defined: refusing to guess which
integer type it is meant to be (unsigned/signed, int/long). Now
I’m turning it back to a warning again; it seems that guessing
that the enum has size int is a 99%-safe bet. (But not 100%, so it
stays as a warning.)
* Fix leaks in the code handling FILE * arguments. In CPython 3
there is a remaining issue that is hard to fix: if you pass a
Python file object to a FILE * argument, then os.dup() is used and
the new file descriptor is only closed when the GC reclaims the
Python file object—and not at the earlier time when you call
close(), which only closes the original file descriptor. If this
is an issue, you should avoid this automatic convertion of Python
file objects: instead, explicitly manipulate file descriptors and
call fdopen() from C (...via cffi).
Request History
mimi_vx created request
- update to version 1.9.1:
(no changelog available)
- changes from version 1.9:
* Structs with variable-sized arrays as their last field: now we
track the length of the array after ffi.new() is called, just like
we always tracked the length of ffi.new("int[]", 42). This lets us
detect out-of-range accesses to array items. This also lets us
display a better repr(), and have the total size returned by
ffi.sizeof() and ffi.buffer(). Previously both functions would
return a result based on the size of the declared structure type,
with an assumed empty array. (Thanks andrew for starting this
refactoring.)
* Add support in cdef()/set_source() for unspecified-length arrays
in typedefs: typedef int foo_t[...];. It was already supported for
global variables or structure fields.
* I turned in v1.8 a warning from cffi/model.py into an error: 'enum
xxx' has no values explicitly defined: refusing to guess which
integer type it is meant to be (unsigned/signed, int/long). Now
I’m turning it back to a warning again; it seems that guessing
that the enum has size int is a 99%-safe bet. (But not 100%, so it
stays as a warning.)
* Fix leaks in the code handling FILE * arguments. In CPython 3
there is a remaining issue that is hard to fix: if you pass a
Python file object to a FILE * argument, then os.dup() is used and
the new file descriptor is only closed when the GC reclaims the
Python file object—and not at the earlier time when you call
close(), which only closes the original file descriptor. If this
is an issue, you should avoid this automatic convertion of Python
file objects: instead, explicitly manipulate file descriptors and
call fdopen() from C (...via cffi).
leaper added as a reviewer
Submission for python3-cffi by someone who is not maintainer in the devel project (devel:languages:python3). Please review
leaper added leap-reviewers as a reviewer
leaper accepted review
ok
maxlin_factory added as a reviewer
Being evaluated by staging project "openSUSE:Leap:42.3:Staging:adi:15"
maxlin_factory accepted review
Picked openSUSE:Leap:42.3:Staging:adi:15
posophe accepted review
jberry accepted review
ok
jberry_factory accepted review
ready to accept
jberry_factory approved review
ready to accept
lnussel_factory accepted request
Accept to openSUSE:Leap:42.3
openSUSE:Factory/python3-cffi@16 -> openSUSE:Leap:42.3/python3-cffi
expected origin is 'openSUSE:Leap:42.2'
the submitted sources are in or accepted for Factory
request needs review by release management