Update of /cvsroot/pywin32/pywin32/win32/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26221
Modified Files:
odbc.cpp
Log Message:
[ 956093 ] minimal C portability patch for odbc.cpp
Index: odbc.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/odbc.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** odbc.cpp 13 Jul 2004 04:56:22 -0000 1.11
--- odbc.cpp 13 Jul 2004 05:01:21 -0000 1.12
***************
*** 1,7 ****
/*
! odbcmodule.c
Donated to the Python community by EShop, who can not
support it!
*/
--- 1,11 ----
/*
! odbc.cpp
! $Id$
Donated to the Python community by EShop, who can not
support it!
+
+ Note that this can be built on non-Windows systems by a C (not C++)
+ compiler, so should avoid C++ constructs and comments.
*/
***************
*** 20,23 ****
--- 24,33 ----
#include <time.h>
+ #ifndef _cplusplus
+ #define bool int
+ #define true 1
+ #define false 0
+ #endif
+
/* Python 1.5.2 doesn't have PyObject_New
PyObject_NEW is not *quite* as safe, but seem to work fine
***************
*** 1263,1268 ****
if (rows)
{
/* handle insert cases... */
! for(int i = 0; i < PySequence_Length(rows); i++)
{
inputvars = PySequence_GetItem(rows, i);
--- 1273,1279 ----
if (rows)
{
+ int i;
/* handle insert cases... */
! for(i = 0; i < PySequence_Length(rows); i++)
{
inputvars = PySequence_GetItem(rows, i);
|