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

cvs diff -r1.22 -r1.23 pkgsrc/devel/py-cffi/Makefile (expand / switch to unified diff)

--- 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,18 +1,17 @@ @@ -1,18 +1,17 @@
1# $NetBSD: Makefile,v 1.22 2016/09/22 06:44:09 wiz Exp $ 1# $NetBSD: Makefile,v 1.23 2016/11/14 14:31:18 wiz Exp $
2 2
3DISTNAME= cffi-1.8.3 3DISTNAME= cffi-1.9.1
4PKGNAME= ${PYPKGPREFIX}-${DISTNAME} 4PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
5PKGREVISION= 1 
6CATEGORIES= devel 5CATEGORIES= devel
7MASTER_SITES= ${MASTER_SITE_PYPI:=c/cffi/} 6MASTER_SITES= ${MASTER_SITE_PYPI:=c/cffi/}
8 7
9MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= https://pypi.python.org/pypi/cffi/ 9HOMEPAGE= https://pypi.python.org/pypi/cffi/
11COMMENT= Foreign Function Interface for Python calling C code 10COMMENT= Foreign Function Interface for Python calling C code
12LICENSE= mit 11LICENSE= mit
13 12
14USE_TOOLS+= pkg-config 13USE_TOOLS+= pkg-config
15 14
16DEPENDS+= ${PYPKGPREFIX}-cparser-[0-9]*:../../devel/py-cparser 15DEPENDS+= ${PYPKGPREFIX}-cparser-[0-9]*:../../devel/py-cparser
17 16
18NOT_PAX_MPROTECT_SAFE= ${PYSITELIB}/_cffi_backend.so 17NOT_PAX_MPROTECT_SAFE= ${PYSITELIB}/_cffi_backend.so

cvs diff -r1.21 -r1.22 pkgsrc/devel/py-cffi/distinfo (expand / switch to unified diff)

--- 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 @@ @@ -1,7 +1,7 @@
1$NetBSD: distinfo,v 1.21 2016/09/22 06:44:09 wiz Exp $ 1$NetBSD: distinfo,v 1.22 2016/11/14 14:31:18 wiz Exp $
2 2
3SHA1 (cffi-1.8.3.tar.gz) = 2a5be10205bf3f6b21070a71ee2546d838868172 3SHA1 (cffi-1.9.1.tar.gz) = 16265a4b305d433fb9089b19278502e904b0cb43
4RMD160 (cffi-1.8.3.tar.gz) = e13f80925e01699719788a82f8926069084a1d2f 4RMD160 (cffi-1.9.1.tar.gz) = 0521145fc517fc308462acb10cba0551a7f6b524
5SHA512 (cffi-1.8.3.tar.gz) = a5a5f62c9d8607a8477abc2c2c53dcbe2aa4cf964b0592d4db349cd35a199e69a84d6cf160973fb5ee736607fa6a41314e8ff0d84bef2ffe16c08f6071c15222 5SHA512 (cffi-1.9.1.tar.gz) = 6e76f181b6b7b760a14ad70338edd104a8b8e2eac5680e336d3868e0bd031a1665608e29a65dc0c56806afb8a8c03811586f151f3acef11e54e60c1bfcf902e3
6Size (cffi-1.8.3.tar.gz) = 403766 bytes 6Size (cffi-1.9.1.tar.gz) = 407108 bytes
7SHA1 (patch-c_malloc__closure.h) = 491dea2d7e118705cb6ee6b6329fd72180d6f48b 7SHA1 (patch-c_malloc__closure.h) = d169a2ebdf899b5b67a714a068749ce25087be8a

cvs diff -r1.1 -r1.2 pkgsrc/devel/py-cffi/patches/Attic/patch-c_malloc__closure.h (expand / switch to unified diff)

--- 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,14 +1,14 @@ @@ -1,14 +1,14 @@
1$ NetBSD$ 1$NetBSD: patch-c_malloc__closure.h,v 1.2 2016/11/14 14:31:18 wiz Exp $
2 2
3Handle PaX/MPROTECT 3Handle PaX/MPROTECT
4 4
5--- c/malloc_closure.h.orig 2016-09-21 22:53:05.889258675 -0400 5--- c/malloc_closure.h.orig 2016-09-21 22:53:05.889258675 -0400
6+++ c/malloc_closure.h 2016-09-21 22:53:47.057812777 -0400 6+++ c/malloc_closure.h 2016-09-21 22:53:47.057812777 -0400
7@@ -57,6 +57,8 @@ 7@@ -57,6 +57,8 @@
8  8
9 #define is_emutramp_enabled() (emutramp_enabled >= 0 ? emutramp_enabled \ 9 #define is_emutramp_enabled() (emutramp_enabled >= 0 ? emutramp_enabled \
10 : (emutramp_enabled = emutramp_enabled_check ())) 10 : (emutramp_enabled = emutramp_enabled_check ()))
11+#elif defined(__NetBSD__) 11+#elif defined(__NetBSD__)
12+#define is_emutramp_enabled() 1 /* We have PaX MPROTECT, no point in checking if it is enabled! */ 12+#define is_emutramp_enabled() 1 /* We have PaX MPROTECT, no point in checking if it is enabled! */
13 #else 13 #else
14 #define is_emutramp_enabled() 0 14 #define is_emutramp_enabled() 0