[Pyrex] new null check
Eric Huss
e-huss at netmeridian.com
Fri Dec 16 07:22:08 CET 2005
A somewhat minor issue, I noticed that when creating a new object that it
was not checking for a NULL return. Attached is a patch to add a check
(though I don't know if it is "correct", it seems to work for me).
-Eric
-------------- next part --------------
+++ Nodes.py Thu Dec 15 21:50:51 2005
@@ -502,6 +502,7 @@
code.put_init_var_to_py_none(entry, "p->%s")
entry = scope.lookup_here("__new__")
if entry:
+ code.putln("if (o == 0) { return 0; }")
code.putln(
"if (%s(o, a, k) < 0) {" %
entry.func_cname)
More information about the Pyrex
mailing list