diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-01-26 15:41:58 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-01-26 15:41:58 (GMT) |
commit | b62deac9a3aa31b26a98ef6f846d4de506d9322f (patch) | |
tree | 5f5042c945ce53508a0ef99156f1dc9cf1d3f76b /Modules/binascii.c | |
parent | 08673c57f02cf85bc8336cdd7cc90ee530c41ecc (diff) | |
download | cpython-b62deac9a3aa31b26a98ef6f846d4de506d9322f.zip cpython-b62deac9a3aa31b26a98ef6f846d4de506d9322f.tar.gz cpython-b62deac9a3aa31b26a98ef6f846d4de506d9322f.tar.bz2 |
cleanup after custom buffer converter
Diffstat (limited to 'Modules/binascii.c')
-rw-r--r-- | Modules/binascii.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/binascii.c b/Modules/binascii.c index 16f6361..d38182e 100644 --- a/Modules/binascii.c +++ b/Modules/binascii.c @@ -195,6 +195,11 @@ class ascii_buffer_converter(CConverter): type = 'Py_buffer' converter = 'ascii_buffer_converter' impl_by_reference = True + c_default = "{NULL, NULL}" + + def cleanup(self): + name = self.name + return "".join(["if (", name, ".obj)\n PyBuffer_Release(&", name, ");\n"]) [python start generated code]*/ /*[python end generated code: checksum=da39a3ee5e6b4b0d3255bfef95601890afd80709]*/ |