Author: Armin Rigo <[email protected]>
Branch: cffi-1.0
Changeset: r76983:5685e59146f2
Date: 2015-05-02 17:36 +0200
http://bitbucket.org/pypy/pypy/changeset/5685e59146f2/

Log:    Add a _nowrapper arg

diff --git a/pypy/module/_cffi_backend/parse_c_type.py 
b/pypy/module/_cffi_backend/parse_c_type.py
--- a/pypy/module/_cffi_backend/parse_c_type.py
+++ b/pypy/module/_cffi_backend/parse_c_type.py
@@ -14,8 +14,8 @@
 )
 
 def llexternal(name, args, result, **kwds):
-    return rffi.llexternal(name, args, result, compilation_info=eci, **kwds)
-
+    return rffi.llexternal(name, args, result, compilation_info=eci,
+                           _nowrapper=True, **kwds)
 
 GLOBAL_S = rffi.CStruct('struct _cffi_global_s',
                        ('name', rffi.CCHARP),
diff --git a/pypy/module/_cffi_backend/test/test_parse_c_type.py 
b/pypy/module/_cffi_backend/test/test_parse_c_type.py
--- a/pypy/module/_cffi_backend/test/test_parse_c_type.py
+++ b/pypy/module/_cffi_backend/test/test_parse_c_type.py
@@ -92,7 +92,9 @@
     rffi.setintfield(info, 'c_output_size', OUTPUT_SIZE)
     for j in range(OUTPUT_SIZE):
         out[j] = rffi.cast(rffi.VOIDP, -424242)
-    res = parse_c_type.parse_c_type(info, input.encode('ascii'))
+    p_input = rffi.str2charp(input.encode('ascii'))
+    res = parse_c_type.parse_c_type(info, p_input)
+    rffi.free_charp(p_input)
     if res < 0:
         raise ParseError(rffi.charp2str(info.c_error_message).decode('ascii'),
                          rffi.getintfield(info, 'c_error_location'))
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to