Commits

Armin Rigo  committed 2caa2bb

more

  • Participants
  • Parent commits 292e7e6

Comments (0)

Files changed (1)

File c/_cffi_backend.c

         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;