[Informixdb-cvs] informixdb/ext _informixdb.ec,1.83,1.84
Brought to you by:
chaese,
f-apolloner
From: Carsten H. <ch...@us...> - 2006-12-02 02:40:22
|
Update of /cvsroot/informixdb/informixdb/ext In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv20636/ext Modified Files: _informixdb.ec Log Message: cheap performance enhancement Index: _informixdb.ec =================================================================== RCS file: /cvsroot/informixdb/informixdb/ext/_informixdb.ec,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** _informixdb.ec 2 Dec 2006 02:30:46 -0000 1.83 --- _informixdb.ec 2 Dec 2006 02:40:19 -0000 1.84 *************** *** 449,452 **** --- 449,453 ---- PyObject *binary_types; PyObject *named_params; + int have_named_params; } Cursor; *************** *** 1558,1561 **** --- 1559,1563 ---- return 0; } + cur->have_named_params = have_named; if (ctx.parmCount == 0) { *************** *** 1579,1589 **** int i; ! if (PyList_Size(cur->named_params)) { ! /* If cur->named_params is not empty, the statement is using named ! parameters, so the vars must be supplied in a mapping. ! Note that we allow the vars mapping to contain more keys ! than the statement needs. This is analogous to string%dict ! interpolation, and it allows passing locals() as the parameter ! mapping. */ if (vars && !PyMapping_Check(vars)) { --- 1581,1590 ---- int i; ! if (cur->have_named_params) { ! /* If the statement is using named parameters, the vars must be ! supplied in a mapping. Note that we allow the vars mapping to ! contain more keys than the statement needs. This is analogous ! to string%dict interpolation, and it allows passing locals() ! as the parameter mapping. */ if (vars && !PyMapping_Check(vars)) { *************** *** 2701,2704 **** --- 2702,2706 ---- self->binary_types = PyDict_Copy(conn->binary_types); self->named_params = PyList_New(0); + self->have_named_params = 0; self->errorhandler = conn->errorhandler; Py_INCREF(self->errorhandler); |