Update of /cvsroot/pywin32/pywin32/com/win32com/src/include
In directory sc8-pr-cvs1:/tmp/cvs-serv17359/include
Modified Files:
PyIEnumFORMATETC.h PyIEnumVARIANT.h PythonCOM.h
Log Message:
Add PyComEnumProviderTypeObject, for objects that can return (but not
actually be) an iterator.
Index: PyIEnumFORMATETC.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/include/PyIEnumFORMATETC.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PyIEnumFORMATETC.h 23 Oct 2003 23:42:02 -0000 1.3
--- PyIEnumFORMATETC.h 31 Oct 2003 06:55:13 -0000 1.4
***************
*** 12,15 ****
--- 12,16 ----
static PyComEnumTypeObject type;
+ virtual PyObject *iter();
virtual PyObject *iternext();
Index: PyIEnumVARIANT.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/include/PyIEnumVARIANT.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PyIEnumVARIANT.h 23 Oct 2003 23:42:02 -0000 1.4
--- PyIEnumVARIANT.h 31 Oct 2003 06:55:13 -0000 1.5
***************
*** 12,15 ****
--- 12,16 ----
static PyComEnumTypeObject type;
+ virtual PyObject *iter();
virtual PyObject *iternext();
Index: PythonCOM.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/include/PythonCOM.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** PythonCOM.h 30 Oct 2003 06:30:38 -0000 1.13
--- PythonCOM.h 31 Oct 2003 06:55:13 -0000 1.14
***************
*** 154,157 ****
--- 154,165 ----
};
+ // A type used for interfaces that can automatically provide enumerators
+ // (ie, they themselves aren't enumerable, but do have a suitable default
+ // method that returns a PyIEnum object
+ class PYCOM_EXPORT PyComEnumProviderTypeObject : public PyComTypeObject {
+ public:
+ PyComEnumProviderTypeObject( const char *name, PyComTypeObject *pBaseType, int typeSize, struct PyMethodDef* methodList, PyIUnknown* (* thector)(IUnknown *) );
+ };
+
// A type used for PyIEnum interfaces
class PYCOM_EXPORT PyComEnumTypeObject : public PyComTypeObject {
***************
*** 171,175 ****
virtual PyObject *repr();
virtual int compare(PyObject *other) {return (int)this-int(other);}
! virtual PyObject *iter() {Py_INCREF(this);return this;}
virtual PyObject *iternext();
--- 179,183 ----
virtual PyObject *repr();
virtual int compare(PyObject *other) {return (int)this-int(other);}
! virtual PyObject *iter();
virtual PyObject *iternext();
|