History

python/lib/gen_code.py: make sure aubio object has been created before deleting it

Paul Brossier committed 10 years ago

Commit 9e4e3891 parent 6f4f1171 file · +3 −1Browse files

Showing the changes to python (1 of 1 file). Show all

Unified · Split

python/lib/gen_code.py+3−1
@@ -353,7 +353,9 @@ Py_{shortname}_del (Py_{shortname} * self, PyObject * unused) · 352 unmodified lines
353 {del_out}(self->{name});""".format(del_out = del_out, name = name)353 {del_out}(self->{name});""".format(del_out = del_out, name = name)
354 del_fn = get_name(self.del_proto)354 del_fn = get_name(self.del_proto)
355 out += """355 out += """
356 {del_fn}(self->o);356 if (self->o) {{
357 {del_fn}(self->o);
358 }}
357 Py_TYPE(self)->tp_free((PyObject *) self);359 Py_TYPE(self)->tp_free((PyObject *) self);
358}}360}}
359""".format(del_fn = del_fn)361""".format(del_fn = del_fn)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t