[pypy-commit] cffi default: more

arigo noreply at buildbot.pypy.org
Thu Apr 4 17:10:49 CEST 2013


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r1231:2caa2bbd137b
Date: 2013-04-04 17:08 +0200
http://bitbucket.org/cffi/cffi/changeset/2caa2bbd137b/

Log:	more

diff --git a/c/_cffi_backend.c b/c/_cffi_backend.c
--- a/c/_cffi_backend.c
+++ b/c/_cffi_backend.c
@@ -2087,8 +2087,12 @@
         if ((ctptr->ct_flags & CT_CAST_ANYTHING) ||
             ((ctitem->ct_flags & (CT_PRIMITIVE_SIGNED|CT_PRIMITIVE_UNSIGNED))
              && (ctitem->ct_size == sizeof(char)))) {
+#if defined(CFFI_MEM_DEBUG) || defined(CFFI_MEM_LEAK)
+            length = PyBytes_GET_SIZE(init) + 1;
+#else
             *output_data = PyBytes_AS_STRING(init);
             return 0;
+#endif
         }
         else
             goto convert_default;


More information about the pypy-commit mailing list