[Sqlalchemy-commits] sqlalchemy: fix some warnings
Brought to you by:
zzzeek
From: <co...@sq...> - 2012-08-28 23:17:45
|
details: http://hg.sqlalchemy.org/sqlalchemy/sqlalchemy/rev/70340964cfa7 changeset: 8613:70340964cfa7 user: Mike Bayer <mi...@zz...> date: Tue Aug 28 19:17:27 2012 -0400 description: fix some warnings diffstat: lib/sqlalchemy/cextension/utils.c | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diffs (34 lines): diff -r e10040800bd5 -r 70340964cfa7 lib/sqlalchemy/cextension/utils.c --- a/lib/sqlalchemy/cextension/utils.c Tue Aug 28 23:16:47 2012 +0000 +++ b/lib/sqlalchemy/cextension/utils.c Tue Aug 28 19:17:27 2012 -0400 @@ -35,8 +35,11 @@ return NULL; } } + else { + multiparam_size = 0; + } - if (multiparams == Py_None || multiparam_size == 0) { + if (multiparam_size == 0) { if (params != Py_None && PyDict_Size(params) != 0) { enclosing_list = PyList_New(1); if (enclosing_list == NULL) { @@ -68,10 +71,15 @@ return NULL; } } + else { + zero_element_item = NULL; + } if (zero_element_length == 0 || - PyObject_HasAttrString(zero_element_item, "__iter__") && - !PyObject_HasAttrString(zero_element_item, "strip") + ( + PyObject_HasAttrString(zero_element_item, "__iter__") && + !PyObject_HasAttrString(zero_element_item, "strip") + ) ) { /* * execute(stmt, [{}, {}, {}, ...]) |