Update of /cvsroot/pywin32/pywin32/win32/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21985/src
Modified Files:
PyOVERLAPPED.cpp PyWinObjects.h
Log Message:
[ 1408485 ] OVERLAPPED not hashable
Index: PyWinObjects.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinObjects.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** PyWinObjects.h 2 Jun 2005 00:03:33 -0000 1.9
--- PyWinObjects.h 22 Sep 2006 14:31:32 -0000 1.10
***************
*** 156,159 ****
--- 156,160 ----
static PyObject *getattr(PyObject *self, char *name);
static int setattr(PyObject *self, char *name, PyObject *v);
+ static long hashFunc(PyObject *self);
#ifdef _MSC_VER
#pragma warning( disable : 4251 )
Index: PyOVERLAPPED.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PyOVERLAPPED.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** PyOVERLAPPED.cpp 17 Mar 2006 01:53:22 -0000 1.10
--- PyOVERLAPPED.cpp 22 Sep 2006 14:31:32 -0000 1.11
***************
*** 78,82 ****
0, /* tp_as_sequence */
0, /* tp_as_mapping */
! 0,
0, /* tp_call */
0, /* tp_str */
--- 78,82 ----
0, /* tp_as_sequence */
0, /* tp_as_mapping */
! PyOVERLAPPED::hashFunc, /* tp_hash */
0, /* tp_call */
0, /* tp_str */
***************
*** 204,207 ****
--- 204,213 ----
}
+ /*static*/ long PyOVERLAPPED::hashFunc(PyObject *ob)
+ {
+ // Just use the address.
+ return _Py_HashPointer(ob);
+ }
+
/*static*/ void PyOVERLAPPED::deallocFunc(PyObject *ob)
{
|