From: Paul Brossier Date: Sat, 17 Sep 2016 01:18:39 +0000 (+0200) Subject: python/lib/gen_code.py: compare to value in param_init X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=f9cca9c89695ab6b8bc68deb75e68800c1563dff;p=aubio.git python/lib/gen_code.py: compare to value in param_init --- diff --git a/python/lib/gen_code.py b/python/lib/gen_code.py index 73826c1f..2042fa64 100644 --- a/python/lib/gen_code.py +++ b/python/lib/gen_code.py @@ -298,8 +298,7 @@ Py_{shortname}_new (PyTypeObject * pytype, PyObject * args, PyObject * kwds) name = p['name'] return """ self->{name} = {defval}; - // nothing to do? - if ({name} != {defval}) {{ + if ({name} != 0.) {{ self->{name} = {name}; }} """.format(defval = aubiodefvalue[name], name = name)