Author: Armin Rigo <[email protected]>
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;
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to