AW: [Zope-DB] [ANN] Modified version of DCOracle2 is available - RE Dr. Klaus Happle fixes

Maan M. Hamze mmhamze at pleiades.net
Sun Dec 2 14:29:05 EST 2007


Hello -
I was checking your fixes (Dr. Klaus Happle) for the two functions in
dco2.c:
(RE: http://mail.zope.org/pipermail/zope-db/2006-November/004812.html )

static PyObject *Cursor_ResultSet(Cursor *self, int count)    and
static PyObject *Cursor_fetch(Cursor *self, PyObject *args)

I noticed that in the **original** dco2.c we have:

1.  In static PyObject *Cursor_ResultSet(Cursor *self, int count):

#ifndef ORACLE8i
		rs->fetchResultCode = OCI_SUCCESS;
#endif

2.  In static PyObject *Cursor_fetch(Cursor *self, PyObject *args):

#ifndef ORACLE8i
	if (status == OCI_SUCCESS_WITH_INFO) {
	  for (i = 0; i < PyList_Size(self->results); i++) {
	    rs = (ResultSet *) PyList_GetItem(self->results, i);
	    rs->fetchResultCode=status;
	  }
	}
#endif

In both cases, you got rid of #ifndef ORACLE8i in your fixes of the two
functions.

I am just curious as to why these ifndef's were removed.  Can someone
please clarifiy.

Note:  in dco2.c we have:

#ifdef ORACLE9i
# ifndef ORACLE8i
#  define ORACLE8i
# endif
#endif

so with the #ifndef ORACLE8i, I imagine with the original code did not
compile the statements above with Oracle 8 or Oracle 9 detected.  I am
curious how removing the #ifndef ORACLE8i condition in the fixes to the
two functions would affect things at large.
Thanks,
Maan




More information about the Zope-DB mailing list