[pywin32-checkins] pywin32/win32/src PyWinTypes.h, 1.55, 1.56 odbc.cpp, 1.27, 1.28
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-12-06 00:43:25
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22444/win32/src Modified Files: PyWinTypes.h odbc.cpp Log Message: Make TmpPyObject private to odbc module Index: odbc.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/odbc.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** odbc.cpp 3 Dec 2008 22:34:21 -0000 1.27 --- odbc.cpp 6 Dec 2008 00:43:19 -0000 1.28 *************** *** 846,849 **** --- 846,867 ---- } + // Class to hold a temporary reference that decrements itself + class TmpPyObject + { + public: + PyObject *tmp; + TmpPyObject() { tmp=NULL; } + TmpPyObject(PyObject *ob) { tmp=ob; } + PyObject * operator= (PyObject *ob){ + Py_XDECREF(tmp); + tmp=ob; + return tmp; + } + + boolean operator== (PyObject *ob) { return tmp==ob; } + operator PyObject *() { return tmp; } + ~TmpPyObject() { Py_XDECREF(tmp); } + }; + static int ibindDate(cursorObject*cur, int column, PyObject *item) { Index: PyWinTypes.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinTypes.h,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** PyWinTypes.h 4 Dec 2008 00:17:13 -0000 1.55 --- PyWinTypes.h 6 Dec 2008 00:43:19 -0000 1.56 *************** *** 782,804 **** // End of exception helper macros. - - // Class to hold a temporary reference that decrements itself - class TmpPyObject - { - public: - PyObject *tmp; - TmpPyObject() { tmp=NULL; } - TmpPyObject(PyObject *ob) { tmp=ob; } - PyObject * operator= (PyObject *ob){ - Py_XDECREF(tmp); - tmp=ob; - return tmp; - } - - boolean operator== (PyObject *ob) { return tmp==ob; } - operator PyObject *() { return tmp; } - ~TmpPyObject() { Py_XDECREF(tmp); } - }; - #endif // __PYWINTYPES_H__ --- 782,785 ---- |