Mon Nov 14 14:31:18 2016 UTC ()
Updated py-cffi to 1.9.1.
v1.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穃 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秣nd 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).
(wiz)
diff -r1.22 -r1.23 pkgsrc/devel/py-cffi/Makefile
diff -r1.21 -r1.22 pkgsrc/devel/py-cffi/distinfo
diff -r1.1 -r1.2 pkgsrc/devel/py-cffi/patches/patch-c_malloc__closure.h
--- pkgsrc/devel/py-cffi/Makefile 2016/09/22 06:44:09 1.22
+++ pkgsrc/devel/py-cffi/Makefile 2016/11/14 14:31:18 1.23
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.22 2016/09/22 06:44:09 wiz Exp $
+# $NetBSD: Makefile,v 1.23 2016/11/14 14:31:18 wiz Exp $
-DISTNAME= cffi-1.8.3
+DISTNAME= cffi-1.9.1
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
-PKGREVISION= 1
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_PYPI:=c/cffi/}
--- pkgsrc/devel/py-cffi/distinfo 2016/09/22 06:44:09 1.21
+++ pkgsrc/devel/py-cffi/distinfo 2016/11/14 14:31:18 1.22
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.21 2016/09/22 06:44:09 wiz Exp $
+$NetBSD: distinfo,v 1.22 2016/11/14 14:31:18 wiz Exp $
-SHA1 (cffi-1.8.3.tar.gz) = 2a5be10205bf3f6b21070a71ee2546d838868172
+SHA1 (cffi-1.9.1.tar.gz) = 16265a4b305d433fb9089b19278502e904b0cb43
-RMD160 (cffi-1.8.3.tar.gz) = e13f80925e01699719788a82f8926069084a1d2f
+RMD160 (cffi-1.9.1.tar.gz) = 0521145fc517fc308462acb10cba0551a7f6b524
-SHA512 (cffi-1.8.3.tar.gz) = a5a5f62c9d8607a8477abc2c2c53dcbe2aa4cf964b0592d4db349cd35a199e69a84d6cf160973fb5ee736607fa6a41314e8ff0d84bef2ffe16c08f6071c15222
+SHA512 (cffi-1.9.1.tar.gz) = 6e76f181b6b7b760a14ad70338edd104a8b8e2eac5680e336d3868e0bd031a1665608e29a65dc0c56806afb8a8c03811586f151f3acef11e54e60c1bfcf902e3
-Size (cffi-1.8.3.tar.gz) = 403766 bytes
+Size (cffi-1.9.1.tar.gz) = 407108 bytes
-SHA1 (patch-c_malloc__closure.h) = 491dea2d7e118705cb6ee6b6329fd72180d6f48b
+SHA1 (patch-c_malloc__closure.h) = d169a2ebdf899b5b67a714a068749ce25087be8a
--- pkgsrc/devel/py-cffi/patches/Attic/patch-c_malloc__closure.h 2016/09/22 02:59:36 1.1
+++ pkgsrc/devel/py-cffi/patches/Attic/patch-c_malloc__closure.h 2016/11/14 14:31:18 1.2
@@ -1,4 +1,4 @@
-$ NetBSD$
+$NetBSD: patch-c_malloc__closure.h,v 1.2 2016/11/14 14:31:18 wiz Exp $
Handle PaX/MPROTECT