Update of /cvsroot/pywin32/pywin32/win32/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11688/src
Modified Files:
PyACL.cpp PyHANDLE.cpp PyIID.cpp PyLARGE_INTEGER.cpp
PyOVERLAPPED.cpp PySECURITY_ATTRIBUTES.cpp
PySECURITY_DESCRIPTOR.cpp PySID.cpp PySecurityObjects.h
PyTime.cpp PyWinObjects.h PyWinTypes.h mmapfilemodule.cpp
win2krasmodule.cpp win32api_display.h win32apimodule.cpp
win32evtlog.i win32file.i win32file_comm.cpp win32gui.i
win32helpmodule.cpp win32process.i win32rasmodule.cpp
win32security.i win32service.i
Added Files:
win32file_comm.h
Log Message:
Merge many tp_getattro/setattro, "2 ints" and buffer changes from Roger
via the py3k branch.
Index: win32process.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32process.i,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** win32process.i 3 Dec 2008 22:34:21 -0000 1.36
--- win32process.i 11 Dec 2008 00:25:40 -0000 1.37
***************
*** 85,93 ****
static void deallocFunc(PyObject *ob);
! static PyObject *getattr(PyObject *self, char *name);
! static int setattr(PyObject *self, char *name, PyObject *v);
! #pragma warning( disable : 4251 )
! static struct memberlist memberlist[];
! #pragma warning( default : 4251 )
protected:
--- 85,91 ----
static void deallocFunc(PyObject *ob);
! static PyObject *getattro(PyObject *self, PyObject *obname);
! static int setattro(PyObject *self, PyObject *obname, PyObject *v);
! static struct PyMemberDef members[];
protected:
***************
*** 109,114 ****
PySTARTUPINFO::deallocFunc, /* tp_dealloc */
0, /* tp_print */
! PySTARTUPINFO::getattr, /* tp_getattr */
! PySTARTUPINFO::setattr, /* tp_setattr */
0, /* tp_compare */
0, /* tp_repr */
--- 107,112 ----
PySTARTUPINFO::deallocFunc, /* tp_dealloc */
0, /* tp_print */
! 0, /* tp_getattr */
! 0, /* tp_setattr */
0, /* tp_compare */
0, /* tp_repr */
***************
*** 119,127 ****
0, /* tp_call */
0, /* tp_str */
};
#define OFF(e) offsetof(PySTARTUPINFO, e)
! /*static*/ struct memberlist PySTARTUPINFO::memberlist[] = {
{"dwX", T_INT, OFF(m_startupinfo.dwX)}, // @prop integer|dwX|Specifies the x offset, in pixels, of the upper left corner of a window if a new window is created. The offset is from the upper left corner of the screen.
{"dwY", T_INT, OFF(m_startupinfo.dwY)}, // @prop integer|dwY|Specifies the y offset, in pixels, of the upper left corner of a window if a new window is created. The offset is from the upper left corner of the screen.
--- 117,147 ----
0, /* tp_call */
0, /* tp_str */
+ PySTARTUPINFO::getattro, /* tp_getattr */
+ PySTARTUPINFO::setattro, /* tp_setattr */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT, /* tp_flags */
+ "A Python object, representing a STARTUPINFO structure", /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ 0, /* tp_methods */
+ PySTARTUPINFO::members, /* tp_members */
+ 0, /* tp_getset */
+ 0, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ 0, /* tp_init */
+ 0, /* tp_alloc */
+ 0, /* tp_new */
};
#define OFF(e) offsetof(PySTARTUPINFO, e)
! /*static*/ struct PyMemberDef PySTARTUPINFO::members[] = {
{"dwX", T_INT, OFF(m_startupinfo.dwX)}, // @prop integer|dwX|Specifies the x offset, in pixels, of the upper left corner of a window if a new window is created. The offset is from the upper left corner of the screen.
{"dwY", T_INT, OFF(m_startupinfo.dwY)}, // @prop integer|dwY|Specifies the y offset, in pixels, of the upper left corner of a window if a new window is created. The offset is from the upper left corner of the screen.
***************
*** 177,183 ****
}
! PyObject *PySTARTUPINFO::getattr(PyObject *self, char *name)
{
PySTARTUPINFO *pO = (PySTARTUPINFO *)self;
// @prop integer/<o PyHANDLE>|hStdInput|
// @prop integer/<o PyHANDLE>|hStdOutput|
--- 197,206 ----
}
! PyObject *PySTARTUPINFO::getattro(PyObject *self, PyObject *obname)
{
PySTARTUPINFO *pO = (PySTARTUPINFO *)self;
+ char *name=PYWIN_ATTR_CONVERT(obname);
+ if (name == NULL)
+ return NULL;
// @prop integer/<o PyHANDLE>|hStdInput|
// @prop integer/<o PyHANDLE>|hStdOutput|
***************
*** 195,199 ****
if (strcmp("lpTitle", name)==0)
return PyWinObject_FromTCHAR(pO->m_startupinfo.lpTitle);
! return PyMember_Get((char *)self, memberlist, name);
}
--- 218,222 ----
if (strcmp("lpTitle", name)==0)
return PyWinObject_FromTCHAR(pO->m_startupinfo.lpTitle);
! return PyObject_GenericGetAttr(self, obname);
}
***************
*** 214,218 ****
}
! int PySTARTUPINFO::setattr(PyObject *self, char *name, PyObject *v)
{
if (v == NULL) {
--- 237,241 ----
}
! int PySTARTUPINFO::setattro(PyObject *self, PyObject *obname, PyObject *v)
{
if (v == NULL) {
***************
*** 221,224 ****
--- 244,250 ----
}
PySTARTUPINFO *pO = (PySTARTUPINFO *)self;
+ char *name=PYWIN_ATTR_CONVERT(obname);
+ if (name == NULL)
+ return -1;
if (strcmp("hStdInput", name)==0)
return sethandle( &pO->m_obStdIn, &pO->m_startupinfo.hStdInput, v);
***************
*** 247,251 ****
return 0;
}
! return PyMember_Set((char *)self, memberlist, name, v);
}
--- 273,277 ----
return 0;
}
! return PyObject_GenericSetAttr(self, obname, v);
}
***************
*** 1526,1529 ****
--- 1552,1561 ----
%init %{
+
+ #if (PY_VERSION_HEX >= 0x03000000)
+ if (PyType_Ready(&PySTARTUPINFOType) == -1)
+ return NULL;
+ #endif
+
FARPROC fp=NULL;
HMODULE hmodule=NULL;
***************
*** 1532,1540 ****
hmodule=LoadLibrary(_T("Psapi.dll"));
if (hmodule!=NULL){
! pfnEnumProcesses = (EnumProcessesfunc)GetProcAddress(hmodule, _T("EnumProcesses"));
! pfnEnumProcessModules = (EnumProcessModulesfunc)GetProcAddress(hmodule, _T("EnumProcessModules"));
! pfnGetModuleFileNameEx = (GetModuleFileNameExfunc)GetProcAddress(hmodule, _T("GetModuleFileNameExW"));
#ifndef MS_WINCE
! pfnGetProcessMemoryInfo = (GetProcessMemoryInfofunc)GetProcAddress(hmodule, _T("GetProcessMemoryInfo"));
#endif
}
--- 1564,1572 ----
hmodule=LoadLibrary(_T("Psapi.dll"));
if (hmodule!=NULL){
! pfnEnumProcesses = (EnumProcessesfunc)GetProcAddress(hmodule, "EnumProcesses");
! pfnEnumProcessModules = (EnumProcessModulesfunc)GetProcAddress(hmodule, "EnumProcessModules");
! pfnGetModuleFileNameEx = (GetModuleFileNameExfunc)GetProcAddress(hmodule, "GetModuleFileNameExW");
#ifndef MS_WINCE
! pfnGetProcessMemoryInfo = (GetProcessMemoryInfofunc)GetProcAddress(hmodule, "GetProcessMemoryInfo");
#endif
}
Index: PyWinObjects.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinObjects.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** PyWinObjects.h 13 Nov 2008 11:11:58 -0000 1.15
--- PyWinObjects.h 11 Dec 2008 00:25:40 -0000 1.16
***************
*** 19,22 ****
--- 19,23 ----
/* Python support */
int compare(PyObject *ob);
+ PyObject *richcompare(PyObject *other, int op);
long hash(void);
PyObject *str(void);
***************
*** 26,29 ****
--- 27,31 ----
static int printFunc(PyObject *ob, FILE *fp, int flags);
static int compareFunc(PyObject *ob1, PyObject *ob2);
+ static PyObject *richcompareFunc(PyObject *self, PyObject *other, int op);
static long hashFunc(PyObject *ob);
static PyObject * strFunc(PyObject *ob);
***************
*** 53,58 ****
PyObject *repr();
int compare(PyObject *ob);
int print(FILE *fp, int flags);
- PyObject *getattr(char *name);
long hash(void);
//PyObject *str(void);
--- 55,61 ----
PyObject *repr();
int compare(PyObject *ob);
+ PyObject *PyTime::richcompare(PyObject *other, int op);
+
int print(FILE *fp, int flags);
long hash(void);
//PyObject *str(void);
***************
*** 64,69 ****
static void deallocFunc(PyObject *ob);
static int printFunc(PyObject *ob, FILE *fp, int flags);
! static PyObject *getattrFunc(PyObject *ob, char *attr);
static int compareFunc(PyObject *ob1, PyObject *ob2);
static long hashFunc(PyObject *ob);
//static PyObject * strFunc(PyObject *ob);
--- 67,73 ----
static void deallocFunc(PyObject *ob);
static int printFunc(PyObject *ob, FILE *fp, int flags);
! static PyObject *getattro(PyObject *self, PyObject *obname);
static int compareFunc(PyObject *ob1, PyObject *ob2);
+ static PyObject *richcompareFunc(PyObject *self, PyObject *other, int op);
static long hashFunc(PyObject *ob);
//static PyObject * strFunc(PyObject *ob);
***************
*** 73,76 ****
--- 77,81 ----
static PyObject * strFunc(PyObject *ob);
static PyObject * reprFunc(PyObject *ob);
+ static struct PyMethodDef methods[];
// Methods
static PyObject *Format(PyObject *self, PyObject *args);
***************
*** 105,120 ****
static int compareFunc(PyObject *ob1, PyObject *ob2);
! 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 )
! #endif // _MSC_VER
! static struct memberlist memberlist[];
! #ifdef _MSC_VER
! #pragma warning( default : 4251 )
! #endif // _MSC_VER
sMyOverlapped m_overlapped;
! PyObject *m_obHandle;
};
--- 110,128 ----
static int compareFunc(PyObject *ob1, PyObject *ob2);
! static PyObject *getattro(PyObject *self, PyObject *obname);
! static int setattro(PyObject *self, PyObject *obname, PyObject *v);
static long hashFunc(PyObject *self);
! static struct PYWINTYPES_EXPORT PyMemberDef members[];
!
! static PyObject *get_hEvent(PyObject *self, void *unused);
! static int set_hEvent(PyObject *self, PyObject *v, void *unused);
! static PyObject *get_Internal(PyObject *self, void *unused);
! static int set_Internal(PyObject *self, PyObject *v, void *unused);
! static PyObject *get_InternalHigh(PyObject *self, void *unused);
! static int set_InternalHigh(PyObject *self, PyObject *v, void *unused);
! static PyGetSetDef getset[];
!
sMyOverlapped m_overlapped;
! PyObject *m_obhEvent;
};
***************
*** 149,164 ****
static PyObject * ternaryFailureFunc(PyObject *ob1, PyObject *ob2, PyObject *ob3);
static PyObject *Close(PyObject *self, PyObject *args);
static PyObject *Detach(PyObject *self, PyObject *args);
!
! static PyObject *getattr(PyObject *self, char *name);
! static int setattr(PyObject *self, char *name, PyObject *v);
! #ifdef _MSC_VER
! #pragma warning( disable : 4251 )
! #endif // _MSC_VER
! static struct memberlist memberlist[];
! #ifdef _MSC_VER
! #pragma warning( default : 4251 )
! #endif // _MSC_VER
protected:
--- 157,166 ----
static PyObject * ternaryFailureFunc(PyObject *ob1, PyObject *ob2, PyObject *ob3);
+ static PyObject *get_handle(PyObject *self, void *unused);
+ static PyGetSetDef getset[];
+
static PyObject *Close(PyObject *self, PyObject *args);
static PyObject *Detach(PyObject *self, PyObject *args);
! static struct PyMethodDef methods[];
protected:
--- NEW FILE: win32file_comm.h ---
// The communications related functions.
// The COMM port enhancements were added by Mark Hammond, and are
// (c) 2000-2001, ActiveState Tools Corp.
// The comms port helpers.
extern PyObject *PyWinObject_FromCOMSTAT(const COMSTAT *pCOMSTAT);
extern BOOL PyWinObject_AsCOMSTAT(PyObject *ob, COMSTAT **ppCOMSTAT, BOOL bNoneOK = TRUE);
extern BOOL PyWinObject_AsDCB(PyObject *ob, DCB **ppDCB, BOOL bNoneOK = TRUE);
extern PyObject *PyWinObject_FromDCB(const DCB *pDCB);
extern PyObject *PyWinMethod_NewDCB(PyObject *self, PyObject *args);
extern PyObject *PyWinObject_FromCOMMTIMEOUTS( COMMTIMEOUTS *p);
extern BOOL PyWinObject_AsCOMMTIMEOUTS( PyObject *ob, COMMTIMEOUTS *p);
class PyDCB : public PyObject
{
public:
DCB *GetDCB() {return &m_DCB;}
PyDCB(void);
PyDCB(const DCB &);
~PyDCB();
/* Python support */
int compare(PyObject *ob);
static void deallocFunc(PyObject *ob);
static int compareFunc(PyObject *ob1, PyObject *ob2);
static PyObject *getattro(PyObject *self, PyObject *obname);
static int setattro(PyObject *self, PyObject *obname, PyObject *v);
static struct PyMemberDef members[];
static PyTypeObject type;
protected:
DCB m_DCB;
};
#define PyDCB_Check(x) ((x)->ob_type==&PyDCB::type)
////////////////////////////////////////////////////////////////
//
// COMSTAT object.
//
////////////////////////////////////////////////////////////////
class PyCOMSTAT : public PyObject
{
public:
COMSTAT *GetCOMSTAT() {return &m_COMSTAT;}
PyCOMSTAT(void);
PyCOMSTAT(const COMSTAT &);
~PyCOMSTAT();
/* Python support */
int compare(PyObject *ob);
static void deallocFunc(PyObject *ob);
static int compareFunc(PyObject *ob1, PyObject *ob2);
static PyObject *getattro(PyObject *self, PyObject *obname);
static int setattro(PyObject *self, PyObject *obname, PyObject *v);
static struct PyMemberDef members[];
static PyTypeObject type;
protected:
COMSTAT m_COMSTAT;
};
#define PyCOMSTAT_Check(x) ((x)->ob_type==&PyCOMSTAT::type)
Index: PySECURITY_DESCRIPTOR.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PySECURITY_DESCRIPTOR.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** PySECURITY_DESCRIPTOR.cpp 3 Dec 2008 22:34:21 -0000 1.21
--- PySECURITY_DESCRIPTOR.cpp 11 Dec 2008 00:25:40 -0000 1.22
***************
*** 678,682 ****
// @object PySECURITY_DESCRIPTOR|A Python object, representing a SECURITY_DESCRIPTOR structure
! static struct PyMethodDef PySECURITY_DESCRIPTOR_methods[] = {
{"Initialize", PySECURITY_DESCRIPTOR::Initialize, 1}, // @pymeth Initialize|Initializes the object.
{"GetSecurityDescriptorOwner", PySECURITY_DESCRIPTOR::GetSecurityDescriptorOwner, 1}, // @pymeth GetSecurityDescriptorOwner|Return the owner of the security descriptor. SID is returned.
--- 678,682 ----
// @object PySECURITY_DESCRIPTOR|A Python object, representing a SECURITY_DESCRIPTOR structure
! struct PyMethodDef PySECURITY_DESCRIPTOR::methods[] = {
{"Initialize", PySECURITY_DESCRIPTOR::Initialize, 1}, // @pymeth Initialize|Initializes the object.
{"GetSecurityDescriptorOwner", PySECURITY_DESCRIPTOR::GetSecurityDescriptorOwner, 1}, // @pymeth GetSecurityDescriptorOwner|Return the owner of the security descriptor. SID is returned.
***************
*** 697,700 ****
--- 697,721 ----
};
+ // Buffer interface in Python 3.0 has changed
+ #if (PY_VERSION_HEX < 0x03000000)
+ /*static*/ Py_ssize_t PySECURITY_DESCRIPTOR::getreadbuf(PyObject *self, Py_ssize_t index, void **ptr)
+ {
+ if ( index != 0 ) {
+ PyErr_SetString(PyExc_SystemError,
+ "accessing non-existent SID segment");
+ return -1;
+ }
+ PySECURITY_DESCRIPTOR *pysd = (PySECURITY_DESCRIPTOR *)self;
+ *ptr = pysd->m_psd;
+ return GetSecurityDescriptorLength(pysd->m_psd);
+ }
+
+ /*static*/ Py_ssize_t PySECURITY_DESCRIPTOR::getsegcount(PyObject *self, Py_ssize_t *lenp)
+ {
+ if ( lenp )
+ *lenp = GetSecurityDescriptorLength(((PySECURITY_DESCRIPTOR *)self)->m_psd);
+ return 1;
+ }
+
static PyBufferProcs PySECURITY_DESCRIPTOR_as_buffer = {
PySECURITY_DESCRIPTOR::getreadbuf,
***************
*** 704,707 ****
--- 725,742 ----
};
+ #else // New buffer interface for Python 3.0
+ /*static*/ int PySECURITY_DESCRIPTOR::getbufferinfo(PyObject *self, Py_buffer *view, int flags)
+ {
+ PySECURITY_DESCRIPTOR *pysd = (PySECURITY_DESCRIPTOR *)self;
+ return PyBuffer_FillInfo(view, self, pysd->m_psd,
+ GetSecurityDescriptorLength(pysd->m_psd), 1, flags);
+ }
+
+ static PyBufferProcs PySECURITY_DESCRIPTOR_as_buffer = {
+ PySECURITY_DESCRIPTOR::getbufferinfo,
+ NULL // Don't need to release any memory from Py_buffer struct
+ };
+ #endif // PY_VERSION_HEX < 0x03000000
+
PYWINTYPES_EXPORT PyTypeObject PySECURITY_DESCRIPTORType =
{
***************
*** 712,717 ****
PySECURITY_DESCRIPTOR::deallocFunc, /* tp_dealloc */
0, /* tp_print */
! PySECURITY_DESCRIPTOR::getattr, /* tp_getattr */
! PySECURITY_DESCRIPTOR::setattr, /* tp_setattr */
0, /* tp_compare */
0, /* tp_repr */
--- 747,752 ----
PySECURITY_DESCRIPTOR::deallocFunc, /* tp_dealloc */
0, /* tp_print */
! 0, /* tp_getattr */
! 0, /* tp_setattr */
0, /* tp_compare */
0, /* tp_repr */
***************
*** 722,736 ****
0, /* tp_call */
0, /* tp_str */
! 0, /*tp_getattro*/
! 0, /*tp_setattro*/
// @comm Note the PySECURITY_DESCRIPTOR object supports the buffer interface. Thus buffer(sd) can be used to obtain the raw bytes.
&PySECURITY_DESCRIPTOR_as_buffer, /*tp_as_buffer*/
};
- #define OFF(e) offsetof(PySECURITY_DESCRIPTOR, e)
-
- /*static*/ struct memberlist PySECURITY_DESCRIPTOR::memberlist[] = {
- {NULL} /* Sentinel */
- };
PySECURITY_DESCRIPTOR::PySECURITY_DESCRIPTOR(Py_ssize_t cb /*= 0*/)
--- 757,785 ----
0, /* tp_call */
0, /* tp_str */
! PyObject_GenericGetAttr, /* tp_getattro */
! PyObject_GenericSetAttr, /* tp_setattro */
// @comm Note the PySECURITY_DESCRIPTOR object supports the buffer interface. Thus buffer(sd) can be used to obtain the raw bytes.
&PySECURITY_DESCRIPTOR_as_buffer, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ PySECURITY_DESCRIPTOR::methods, /* tp_methods */
+ 0, /* tp_members */
+ 0, /* tp_getset */
+ 0, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ 0, /* tp_init */
+ 0, /* tp_alloc */
+ 0, /* tp_new */
};
PySECURITY_DESCRIPTOR::PySECURITY_DESCRIPTOR(Py_ssize_t cb /*= 0*/)
***************
*** 759,806 ****
}
- PyObject *PySECURITY_DESCRIPTOR::getattr(PyObject *self, char *name)
- {
- PyObject *res;
-
- res = Py_FindMethod(PySECURITY_DESCRIPTOR_methods, self, name);
- if (res != NULL)
- return res;
- PyErr_Clear();
- return PyMember_Get((char *)self, memberlist, name);
- }
-
- int PySECURITY_DESCRIPTOR::setattr(PyObject *self, char *name, PyObject *v)
- {
- if (v == NULL) {
- PyErr_SetString(PyExc_AttributeError, "can't delete SECURITY_DESCRIPTOR attributes");
- return -1;
- }
- return PyMember_Set((char *)self, memberlist, name, v);
- }
-
/*static*/ void PySECURITY_DESCRIPTOR::deallocFunc(PyObject *ob)
{
delete (PySECURITY_DESCRIPTOR *)ob;
}
-
- /*static*/ Py_ssize_t PySECURITY_DESCRIPTOR::getreadbuf(PyObject *self, Py_ssize_t index, void **ptr)
- {
- if ( index != 0 ) {
- PyErr_SetString(PyExc_SystemError,
- "accessing non-existent SID segment");
- return -1;
- }
- PySECURITY_DESCRIPTOR *pysd = (PySECURITY_DESCRIPTOR *)self;
- *ptr = pysd->m_psd;
- return GetSecurityDescriptorLength(pysd->m_psd);
- }
-
- /*static*/ Py_ssize_t PySECURITY_DESCRIPTOR::getsegcount(PyObject *self, Py_ssize_t *lenp)
- {
- if ( lenp )
- *lenp = GetSecurityDescriptorLength(((PySECURITY_DESCRIPTOR *)self)->m_psd);
- return 1;
- }
-
#else /* NO_PYWINTYPES_SECURITY */
--- 808,815 ----
Index: win32apimodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32apimodule.cpp,v
retrieving revision 1.92
retrieving revision 1.93
diff -C2 -d -r1.92 -r1.93
*** win32apimodule.cpp 8 Dec 2008 13:16:37 -0000 1.92
--- win32apimodule.cpp 11 Dec 2008 00:25:40 -0000 1.93
***************
*** 3793,3797 ****
DWORD nSubKeys, nValues;
FILETIME ft;
- PyObject *l;
// @pyparm <o PyHKEY>/int|key||An already open key, or or any one of the following win32con
--- 3793,3796 ----
***************
*** 3809,3816 ****
)!=ERROR_SUCCESS)
return ReturnAPIError("RegQueryInfoKey", rc);
! if (!(l=PyLong_FromTwoInts(ft.dwHighDateTime, ft.dwLowDateTime)))
! return NULL;
! PyObject *ret = Py_BuildValue("iiO",nSubKeys,nValues,l);
! Py_DECREF(l);
return ret;
}
--- 3808,3816 ----
)!=ERROR_SUCCESS)
return ReturnAPIError("RegQueryInfoKey", rc);
! ULARGE_INTEGER l;
! l.LowPart = ft.dwLowDateTime;
! l.HighPart = ft.dwHighDateTime;
! PyObject *ret = Py_BuildValue("iiN",nSubKeys,nValues,
! PyWinObject_FromULARGE_INTEGER(l));
return ret;
}
Index: win32api_display.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32api_display.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** win32api_display.h 4 Dec 2008 00:17:13 -0000 1.4
--- win32api_display.h 11 Dec 2008 00:25:40 -0000 1.5
***************
*** 45,49 ****
static struct PyMemberDef members[];
static struct PyMethodDef methods[];
-
static void deallocFunc(PyObject *ob);
PyDISPLAY_DEVICE(PDISPLAY_DEVICE);
--- 45,48 ----
Index: win32security.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32security.i,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** win32security.i 7 Dec 2008 18:00:40 -0000 1.49
--- win32security.i 11 Dec 2008 00:25:40 -0000 1.50
***************
*** 830,834 ****
pfnDsFreeNameResult=(DsFreeNameResultfunc)loadapifunc("DsFreeNameResultW", ntdsapi_dll);
pfnDsGetDcName=(DsGetDcNamefunc)loadapifunc("DsGetDcNameW", netapi32_dll);
!
// old names, these should not be used
PyDict_SetItemString(d, "SecBufferType", (PyObject *)&PySecBufferType);
--- 830,846 ----
pfnDsFreeNameResult=(DsFreeNameResultfunc)loadapifunc("DsFreeNameResultW", ntdsapi_dll);
pfnDsGetDcName=(DsGetDcNamefunc)loadapifunc("DsGetDcNameW", netapi32_dll);
!
! // Py3k requires that *all* types have to be initialized
! #if (PY_VERSION_HEX >= 0x03000000)
! if (PyType_Ready(&PySecBufferType) == -1)
! return NULL;
! if (PyType_Ready(&PySecBufferDescType) == -1)
! return NULL;
! if (PyType_Ready(&PyCtxtHandleType) == -1)
! return NULL;
! if (PyType_Ready(&PyCredHandleType) == -1)
! return NULL;
! #endif
!
// old names, these should not be used
PyDict_SetItemString(d, "SecBufferType", (PyObject *)&PySecBufferType);
Index: PySID.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PySID.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** PySID.cpp 3 Dec 2008 22:34:21 -0000 1.14
--- PySID.cpp 11 Dec 2008 00:25:40 -0000 1.15
***************
*** 179,183 ****
// @object PySID|A Python object, representing a SID structure
! static struct PyMethodDef PySID_methods[] = {
{"Initialize", PySID::Initialize, 1}, // @pymeth Initialize|Initialize the SID.
{"IsValid", PySID::IsValid, 1}, // @pymeth IsValid|Determines if the SID is valid.
--- 179,183 ----
// @object PySID|A Python object, representing a SID structure
! struct PyMethodDef PySID::methods[] = {
{"Initialize", PySID::Initialize, 1}, // @pymeth Initialize|Initialize the SID.
{"IsValid", PySID::IsValid, 1}, // @pymeth IsValid|Determines if the SID is valid.
***************
*** 190,193 ****
--- 190,215 ----
};
+
+
+ #if (PY_VERSION_HEX < 0x03000000)
+ /*static*/ Py_ssize_t PySID::getreadbuf(PyObject *self, Py_ssize_t index, void **ptr)
+ {
+ if ( index != 0 ) {
+ PyErr_SetString(PyExc_SystemError,
+ "accessing non-existent SID segment");
+ return -1;
+ }
+ PySID *pysid = (PySID *)self;
+ *ptr = pysid->m_psid;
+ return GetLengthSid(pysid->m_psid);
+ }
+
+ /*static*/ Py_ssize_t PySID::getsegcount(PyObject *self, Py_ssize_t *lenp)
+ {
+ if ( lenp )
+ *lenp = GetLengthSid(((PySID *)self)->m_psid);
+ return 1;
+ }
+
static PyBufferProcs PySID_as_buffer = {
PySID::getreadbuf,
***************
*** 197,200 ****
--- 219,236 ----
};
+ #else // New buffer interface in Py3k
+
+ /*static*/ int PySID::getbufferinfo(PyObject *self, Py_buffer *view, int flags)
+ {
+ PySID *pysid = (PySID *)self;
+ return PyBuffer_FillInfo(view, self, pysid->m_psid, GetLengthSid(pysid->m_psid), 1, flags);
+ }
+
+ static PyBufferProcs PySID_as_buffer = {
+ PySID::getbufferinfo,
+ NULL, // Does not have any allocated mem in Py_buffer struct
+ };
+
+ #endif // PY_VERSION_HEX < 0x03000000
PYWINTYPES_EXPORT PyTypeObject PySIDType =
***************
*** 206,210 ****
PySID::deallocFunc, /* tp_dealloc */
0, /* tp_print */
! PySID::getattr, /* tp_getattr */
0, /* tp_setattr */
// @pymeth __cmp__|Used when objects are compared.
--- 242,246 ----
PySID::deallocFunc, /* tp_dealloc */
0, /* tp_print */
! 0, /* tp_getattr */
0, /* tp_setattr */
// @pymeth __cmp__|Used when objects are compared.
***************
*** 217,224 ****
0, /* tp_call */
PySID::strFunc, /* tp_str */
! 0, /*tp_getattro*/
! 0, /*tp_setattro*/
// @comm Note the PySID object supports the buffer interface. Thus buffer(sid) can be used to obtain the raw bytes.
&PySID_as_buffer, /*tp_as_buffer*/
};
--- 253,279 ----
0, /* tp_call */
PySID::strFunc, /* tp_str */
! PyObject_GenericGetAttr, /*tp_getattro*/
! 0, /*tp_setattro*/
// @comm Note the PySID object supports the buffer interface. Thus buffer(sid) can be used to obtain the raw bytes.
&PySID_as_buffer, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ PySID::methods, /* tp_methods */
+ 0, /* tp_members */
+ 0, /* tp_getset */
+ 0, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ 0, /* tp_init */
+ 0, /* tp_alloc */
+ 0, /* tp_new */
};
***************
*** 251,265 ****
}
- PyObject *PySID::getattr(PyObject *self, char *name)
- {
- return Py_FindMethod(PySID_methods, self, name);
- }
-
int PySID::compare(PyObject *ob)
{
! PSID p1 = NULL, p2 = NULL;
! PyWinObject_AsSID(this, &p1);
! PyWinObject_AsSID(ob, &p2);
! return EqualSid(p1, p2)==FALSE;
}
--- 306,315 ----
}
int PySID::compare(PyObject *ob)
{
! PSID p2;
! if (!PyWinObject_AsSID(ob, &p2, FALSE))
! return -2;
! return EqualSid(this->GetSID(), p2)==FALSE;
}
***************
*** 277,300 ****
}
- /*static*/ Py_ssize_t PySID::getreadbuf(PyObject *self, Py_ssize_t index, void **ptr)
- {
- if ( index != 0 ) {
- PyErr_SetString(PyExc_SystemError,
- "accessing non-existent SID segment");
- return -1;
- }
- PySID *pysid = (PySID *)self;
- *ptr = pysid->m_psid;
- return GetLengthSid(pysid->m_psid);
- }
-
- /*static*/ Py_ssize_t PySID::getsegcount(PyObject *self, Py_ssize_t *lenp)
- {
- if ( lenp )
- *lenp = GetLengthSid(((PySID *)self)->m_psid);
- return 1;
- }
-
-
// NOTE: This function taken from KB Q131320.
BOOL GetTextualSid(
--- 327,330 ----
Index: PyOVERLAPPED.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PyOVERLAPPED.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** PyOVERLAPPED.cpp 3 Dec 2008 22:34:21 -0000 1.15
--- PyOVERLAPPED.cpp 11 Dec 2008 00:25:40 -0000 1.16
***************
*** 70,75 ****
PyOVERLAPPED::deallocFunc, /* tp_dealloc */
0, /* tp_print */
! PyOVERLAPPED::getattr, /* tp_getattr */
! PyOVERLAPPED::setattr, /* tp_setattr */
// @pymeth __cmp__|Used when OVERLAPPED objects are compared.
PyOVERLAPPED::compareFunc, /* tp_compare */
--- 70,75 ----
PyOVERLAPPED::deallocFunc, /* tp_dealloc */
0, /* tp_print */
! 0, /* tp_getattr */
! 0, /* tp_setattr */
// @pymeth __cmp__|Used when OVERLAPPED objects are compared.
PyOVERLAPPED::compareFunc, /* tp_compare */
***************
*** 81,89 ****
0, /* tp_call */
0, /* tp_str */
};
#define OFF(e) offsetof(PyOVERLAPPED, e)
! /*static*/ struct memberlist PyOVERLAPPED::memberlist[] = {
{"Offset", T_ULONG, OFF(m_overlapped.Offset)}, // @prop integer|Offset|Specifies a file position at which to start the transfer. The file position is a byte offset from the start of the file. The calling process sets this member before calling the ReadFile or WriteFile function. This member is ignored when reading from or writing to named pipes and communications devices.
{"OffsetHigh", T_ULONG, OFF(m_overlapped.OffsetHigh)}, // @prop integer|OffsetHigh|Specifies the high word of the byte offset at which to start the transfer.
--- 81,111 ----
0, /* tp_call */
0, /* tp_str */
+ PyOVERLAPPED::getattro, /* tp_getattro */
+ PyOVERLAPPED::setattro, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT, /* tp_flags */
+ 0, /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ 0, /* tp_methods */
+ PyOVERLAPPED::members, /* tp_members and tp_getset are apparently mutually exclusive, but this isn't documented anywhere */
+ 0, //PyOVERLAPPED::getset, /* tp_getset */
+ 0, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ 0, /* tp_init */
+ 0, /* tp_alloc */
+ 0, /* tp_new */
};
#define OFF(e) offsetof(PyOVERLAPPED, e)
! /*static*/ struct PYWINTYPES_EXPORT PyMemberDef PyOVERLAPPED::members[] = {
{"Offset", T_ULONG, OFF(m_overlapped.Offset)}, // @prop integer|Offset|Specifies a file position at which to start the transfer. The file position is a byte offset from the start of the file. The calling process sets this member before calling the ReadFile or WriteFile function. This member is ignored when reading from or writing to named pipes and communications devices.
{"OffsetHigh", T_ULONG, OFF(m_overlapped.OffsetHigh)}, // @prop integer|OffsetHigh|Specifies the high word of the byte offset at which to start the transfer.
***************
*** 91,95 ****
{"dword", T_ULONG, OFF(m_overlapped.dwValue)}, // @prop int|dword|An integer buffer that may be used by overlapped functions (eg, <om win32file.WaitCommEvent>)
! // These are handled by PyOVERLAPPED::getattr, included here so they show up as attributes
{"hEvent", T_OBJECT, OFF(obDummy)}, // @prop <o PyHANDLE>|hEvent|Identifies an event set to the signaled state when the transfer has been completed. The calling process sets this member before calling the <om win32file.ReadFile>, <om win32file.WriteFile>, <om win32pipe.ConnectNamedPipe>, or <om win32pipe.TransactNamedPipe> function.
{"Internal", T_OBJECT, OFF(obDummy)}, // @prop integer|Internal|Reserved for operating system use. (pointer-sized value)
--- 113,117 ----
{"dword", T_ULONG, OFF(m_overlapped.dwValue)}, // @prop int|dword|An integer buffer that may be used by overlapped functions (eg, <om win32file.WaitCommEvent>)
! // These are handled by PyOVERLAPPED::getattro, included here so they show up as attributes
{"hEvent", T_OBJECT, OFF(obDummy)}, // @prop <o PyHANDLE>|hEvent|Identifies an event set to the signaled state when the transfer has been completed. The calling process sets this member before calling the <om win32file.ReadFile>, <om win32file.WriteFile>, <om win32pipe.ConnectNamedPipe>, or <om win32pipe.TransactNamedPipe> function.
{"Internal", T_OBJECT, OFF(obDummy)}, // @prop integer|Internal|Reserved for operating system use. (pointer-sized value)
***************
*** 103,108 ****
_Py_NewReference(this);
memset(&m_overlapped, 0, sizeof(m_overlapped));
- m_obHandle = NULL;
obDummy = NULL;
}
--- 125,130 ----
_Py_NewReference(this);
memset(&m_overlapped, 0, sizeof(m_overlapped));
obDummy = NULL;
+ m_obhEvent = NULL;
}
***************
*** 113,122 ****
m_overlapped = *pO;
Py_XINCREF(m_overlapped.obState);
! m_obHandle = NULL;
}
PyOVERLAPPED::~PyOVERLAPPED(void)
{
! Py_XDECREF(m_obHandle);
Py_XDECREF(m_overlapped.obState);
// set our memory to zero, so our clunky check for an invalid
--- 135,144 ----
m_overlapped = *pO;
Py_XINCREF(m_overlapped.obState);
! m_obhEvent = NULL;
}
PyOVERLAPPED::~PyOVERLAPPED(void)
{
! Py_XDECREF(m_obhEvent);
Py_XDECREF(m_overlapped.obState);
// set our memory to zero, so our clunky check for an invalid
***************
*** 136,146 ****
}
! PyObject *PyOVERLAPPED::getattr(PyObject *self, char *name)
{
if (strcmp("hEvent", name)==0) {
PyOVERLAPPED *pO = (PyOVERLAPPED *)self;
! if (pO->m_obHandle) {
! Py_INCREF(pO->m_obHandle);
! return pO->m_obHandle;
}
return PyWinLong_FromHANDLE(pO->m_overlapped.hEvent);
--- 158,171 ----
}
! PyObject *PyOVERLAPPED::getattro(PyObject *self, PyObject *obname)
{
+ char *name=PYWIN_ATTR_CONVERT(obname);
+ if (name==NULL)
+ return NULL;
if (strcmp("hEvent", name)==0) {
PyOVERLAPPED *pO = (PyOVERLAPPED *)self;
! if (pO->m_obhEvent) {
! Py_INCREF(pO->m_obhEvent);
! return pO->m_obhEvent;
}
return PyWinLong_FromHANDLE(pO->m_overlapped.hEvent);
***************
*** 154,161 ****
return PyWinObject_FromULONG_PTR(pO->m_overlapped.InternalHigh);
}
! return PyMember_Get((char *)self, memberlist, name);
}
! int PyOVERLAPPED::setattr(PyObject *self, char *name, PyObject *v)
{
if (v == NULL) {
--- 179,186 ----
return PyWinObject_FromULONG_PTR(pO->m_overlapped.InternalHigh);
}
! return PyObject_GenericGetAttr(self, obname);
}
! int PyOVERLAPPED::setattro(PyObject *self, PyObject *obname, PyObject *v)
{
if (v == NULL) {
***************
*** 163,166 ****
--- 188,194 ----
return -1;
}
+ char *name=PYWIN_ATTR_CONVERT(obname);
+ if (name==NULL)
+ return NULL;
if (strcmp("hEvent", name)==0) {
PyOVERLAPPED *pO = (PyOVERLAPPED *)self;
***************
*** 170,180 ****
return -1;
pO->m_overlapped.hEvent=htmp;
! Py_XDECREF(pO->m_obHandle);
if (PyHANDLE_Check(v)) {
! pO->m_obHandle = v;
Py_INCREF(v);
}
else
! pO->m_obHandle = NULL;
return 0;
}
--- 198,208 ----
return -1;
pO->m_overlapped.hEvent=htmp;
! Py_XDECREF(pO->m_obhEvent);
if (PyHANDLE_Check(v)) {
! pO->m_obhEvent = v;
Py_INCREF(v);
}
else
! pO->m_obhEvent = NULL;
return 0;
}
***************
*** 195,199 ****
return 0;
}
! return PyMember_Set((char *)self, memberlist, name, v);
}
--- 223,227 ----
return 0;
}
! return PyObject_GenericSetAttr(self, obname, v);
}
Index: PySECURITY_ATTRIBUTES.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PySECURITY_ATTRIBUTES.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** PySECURITY_ATTRIBUTES.cpp 3 Dec 2008 22:34:21 -0000 1.8
--- PySECURITY_ATTRIBUTES.cpp 11 Dec 2008 00:25:40 -0000 1.9
***************
*** 59,63 ****
// @object PySECURITY_ATTRIBUTES|A Python object, representing a SECURITY_ATTRIBUTES structure
! static struct PyMethodDef PySECURITY_ATTRIBUTES_methods[] = {
{NULL}
};
--- 59,63 ----
// @object PySECURITY_ATTRIBUTES|A Python object, representing a SECURITY_ATTRIBUTES structure
! struct PyMethodDef PySECURITY_ATTRIBUTES::methods[] = {
{NULL}
};
***************
*** 72,77 ****
PySECURITY_ATTRIBUTES::deallocFunc, /* tp_dealloc */
0, /* tp_print */
! PySECURITY_ATTRIBUTES::getattr, /* tp_getattr */
! PySECURITY_ATTRIBUTES::setattr, /* tp_setattr */
0, /* tp_compare */
0, /* tp_repr */
--- 72,77 ----
PySECURITY_ATTRIBUTES::deallocFunc, /* tp_dealloc */
0, /* tp_print */
! 0, /* tp_getattr */
! 0, /* tp_setattr */
0, /* tp_compare */
0, /* tp_repr */
***************
*** 82,91 ****
0, /* tp_call */
0, /* tp_str */
};
#define OFF(e) offsetof(PySECURITY_ATTRIBUTES, e)
! /*static*/ struct memberlist PySECURITY_ATTRIBUTES::memberlist[] = {
! {"bInheritHandle", T_INT, OFF(m_sa.bInheritHandle)}, // @prop integer|bInheritHandle|Specifies whether the returned handle is inherited when a new process is created. If this member is TRUE, the new process inherits the handle.
{"SECURITY_DESCRIPTOR", T_OBJECT, OFF(m_obSD)}, // @prop <o PySECURITY_DESCRIPTOR>|SECURITY_DESCRIPTOR|A PySECURITY_DESCRIPTOR, or None
{NULL}
--- 82,113 ----
0, /* tp_call */
0, /* tp_str */
+ PySECURITY_ATTRIBUTES::getattro, /* tp_getattro */
+ PySECURITY_ATTRIBUTES::setattro, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT, /* tp_flags */
+ "A Python object, representing a SECURITY_ATTRIBUTES structure", /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ PySECURITY_ATTRIBUTES::methods, /* tp_methods */
+ PySECURITY_ATTRIBUTES::members, /* tp_members */
+ 0, /* tp_getset */
+ 0, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ 0, /* tp_init */
+ 0, /* tp_alloc */
+ 0, /* tp_new */
};
#define OFF(e) offsetof(PySECURITY_ATTRIBUTES, e)
! /*static*/ struct PYWINTYPES_EXPORT PyMemberDef PySECURITY_ATTRIBUTES::members[] = {
! {"bInheritHandle", T_INT, OFF(m_sa.bInheritHandle)}, // @prop boolean|bInheritHandle|Specifies whether the returned handle is inherited when a new process is created. If this member is TRUE, the new process inherits the handle.
{"SECURITY_DESCRIPTOR", T_OBJECT, OFF(m_obSD)}, // @prop <o PySECURITY_DESCRIPTOR>|SECURITY_DESCRIPTOR|A PySECURITY_DESCRIPTOR, or None
{NULL}
***************
*** 142,167 ****
}
! PyObject *PySECURITY_ATTRIBUTES::getattr(PyObject *self, char *name)
{
! PyObject *res;
!
! res = Py_FindMethod(PySECURITY_ATTRIBUTES_methods, self, name);
if (res != NULL)
return res;
- PyErr_Clear();
- res = PyMember_Get((char *)self, memberlist, name);
- if (res != NULL)
- return res;
// let it inherit methods from PySECURITY_DESCRIPTOR for backward compatibility
PySECURITY_ATTRIBUTES *This = (PySECURITY_ATTRIBUTES *)self;
if (This->m_obSD!=Py_None){
PyErr_Clear();
! res=((PySECURITY_DESCRIPTOR *)(This->m_obSD))->getattr(This->m_obSD, name);
}
return res;
}
! int PySECURITY_ATTRIBUTES::setattr(PyObject *self, char *name, PyObject *v)
{
if (v == NULL) {
--- 164,183 ----
}
! PyObject *PySECURITY_ATTRIBUTES::getattro(PyObject *self, PyObject *obname)
{
! PyObject *res = PyObject_GenericGetAttr(self, obname);
if (res != NULL)
return res;
// let it inherit methods from PySECURITY_DESCRIPTOR for backward compatibility
PySECURITY_ATTRIBUTES *This = (PySECURITY_ATTRIBUTES *)self;
if (This->m_obSD!=Py_None){
PyErr_Clear();
! res=PyObject_GenericGetAttr(This->m_obSD, obname);
}
return res;
}
! int PySECURITY_ATTRIBUTES::setattro(PyObject *self, PyObject *obname, PyObject *v)
{
if (v == NULL) {
***************
*** 169,184 ****
return -1;
}
if (strcmp(name, "SECURITY_DESCRIPTOR")==0){
PySECURITY_ATTRIBUTES *This=(PySECURITY_ATTRIBUTES *)self;
! if (v==Py_None)
! This->m_sa.lpSecurityDescriptor=NULL;
! else if (PySECURITY_DESCRIPTOR_Check(v))
! This->m_sa.lpSecurityDescriptor=((PySECURITY_DESCRIPTOR *)This->m_obSD)->GetSD();
! else{
! PyErr_SetString(PyExc_TypeError, "SECURITY_DESCRIPTOR must be a PySECURITY_DESCRIPTOR, or None");
return -1;
! }
}
! return PyMember_Set((char *)self, memberlist, name, v);
}
--- 185,203 ----
return -1;
}
+ char *name=PYWIN_ATTR_CONVERT(obname);
+ if (name==NULL)
+ return -1;
if (strcmp(name, "SECURITY_DESCRIPTOR")==0){
PySECURITY_ATTRIBUTES *This=(PySECURITY_ATTRIBUTES *)self;
! PSECURITY_DESCRIPTOR psd;
! if (!PyWinObject_AsSECURITY_DESCRIPTOR(v, &psd, TRUE))
return -1;
! Py_XDECREF(This->m_obSD);
! Py_INCREF(v);
! This->m_obSD = v;
! This->m_sa.lpSecurityDescriptor = psd;
! return 0;
}
! return PyObject_GenericSetAttr(self, obname, v);
}
Index: PyWinTypes.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinTypes.h,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -d -r1.57 -r1.58
*** PyWinTypes.h 8 Dec 2008 13:16:37 -0000 1.57
--- PyWinTypes.h 11 Dec 2008 00:25:40 -0000 1.58
***************
*** 140,143 ****
--- 140,150 ----
#endif // FREEZE_PYWINTYPES
+ #if (PY_VERSION_HEX >= 0x03000000)
+ // Py3k uses memoryview object in place of buffer
+ extern PYWINTYPES_EXPORT PyObject *PyBuffer_New(Py_ssize_t size);
+ extern PYWINTYPES_EXPORT PyObject *PyBuffer_FromReadWriteMemory(void *buf, Py_ssize_t size);
+ extern PYWINTYPES_EXPORT PyObject *PyBuffer_FromMemory(void *buf, Py_ssize_t size);
+ #endif
+
// Formats a python traceback into a character string - result must be free()ed
PYWINTYPES_EXPORT char *GetPythonTraceback(PyObject *exc_type, PyObject *exc_value, PyObject *exc_tb);
***************
*** 347,358 ****
** LARGE_INTEGER objects
*/
- // These need to be renamed. For now, the old names still appear in the DLL.
- PYWINTYPES_EXPORT BOOL PyLong_AsTwoInts(PyObject *ob, int *hiint, unsigned *loint);
- PYWINTYPES_EXPORT PyObject *PyLong_FromTwoInts(int hidword, unsigned lodword);
-
- // These seem (to MH anyway :) to be better names than using "int".
- inline BOOL PyLong_AsTwoI32(PyObject *ob, int *hiint, unsigned *loint) {return PyLong_AsTwoInts(ob, hiint, loint);}
- inline PyObject *PyLong_FromTwoI32(int hidword, unsigned lodword) {return PyLong_FromTwoInts(hidword, lodword);}
-
//AsLARGE_INTEGER takes either int or long
PYWINTYPES_EXPORT BOOL PyWinObject_AsLARGE_INTEGER(PyObject *ob, LARGE_INTEGER *pResult);
--- 354,357 ----
***************
*** 369,375 ****
#define PyWinObject_FromUPY_LONG_LONG(val) PyWinObject_FromULARGE_INTEGER((ULARGE_INTEGER)val)
- PyObject *PyLong_FromI64(__int64 ival);
- BOOL PyLong_AsI64(PyObject *val, __int64 *lval);
-
// A DWORD_PTR and ULONG_PTR appear to mean "integer long enough to hold a pointer"
// It is *not* actually a pointer (but is the same size as a pointer)
--- 368,371 ----
Index: win32file.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32file.i,v
retrieving revision 1.95
retrieving revision 1.96
diff -C2 -d -r1.95 -r1.96
*** win32file.i 6 Dec 2008 00:43:45 -0000 1.95
--- win32file.i 11 Dec 2008 00:25:40 -0000 1.96
***************
*** 38,41 ****
--- 38,42 ----
#define NEED_PYWINOBJECTS_H
+ #include "win32file_comm.h"
%}
***************
*** 523,528 ****
PyTypeObject FindFileIterator_Type = {
! PyObject_HEAD_INIT(&PyType_Type)
! 0, /* ob_size */
"FindFileIterator", /* tp_name */
sizeof(FindFileIterator), /* tp_basicsize */
--- 524,528 ----
PyTypeObject FindFileIterator_Type = {
! PYWIN_OBJECT_HEAD
"FindFileIterator", /* tp_name */
sizeof(FindFileIterator), /* tp_basicsize */
***************
*** 649,654 ****
WCHAR *fileName); // @pyparm <o PyUnicode>|fileName||Name of the file to retrieve attributes for.
! // @pyswig int|GetFileTime|Determine a file access/modification times.
! DWORD GetFileTime(
HANDLE handle, // @pyparm <o PyHANDLE>|handle||Handle to the file.
FILETIME *OUTPUT, // @pyparm <o PyTime>|creationTime||
--- 649,655 ----
WCHAR *fileName); // @pyparm <o PyUnicode>|fileName||Name of the file to retrieve attributes for.
! // @pyswig (<o PyTime>, <o PyTime>, <o PyTime>)|GetFileTime|Returns a file's creation, last access, and modification times.
! // @comm Times are returned in UTC time.
! BOOLAPI GetFileTime(
HANDLE handle, // @pyparm <o PyHANDLE>|handle||Handle to the file.
FILETIME *OUTPUT, // @pyparm <o PyTime>|creationTime||
***************
*** 765,780 ****
if (!PyWinObject_AsTCHAR(obName, &fname, FALSE))
return NULL;
! DWORD dwSizeLow, dwSizeHigh;
Py_BEGIN_ALLOW_THREADS
! dwSizeLow = GetCompressedFileSize(fname, &dwSizeHigh);
Py_END_ALLOW_THREADS
// If we failed ...
! if (dwSizeLow == 0xFFFFFFFF &&
GetLastError() != NO_ERROR )
return PyWin_SetAPIError("GetCompressedFileSize");
! return PyLong_FromTwoInts(dwSizeHigh, dwSizeLow);
}
%}
! // @pyswig <o PyLARGE_INTEGER>|GetCompressedFileSize|Determines the compressed size of a file.
%native(GetCompressedFileSize) MyGetCompressedFileSize;
--- 766,783 ----
if (!PyWinObject_AsTCHAR(obName, &fname, FALSE))
return NULL;
! ULARGE_INTEGER ulsize;
Py_BEGIN_ALLOW_THREADS
! ulsize.LowPart = GetCompressedFileSize(fname, &ulsize.HighPart);
Py_END_ALLOW_THREADS
+
+ PyWinObject_FreeTCHAR(fname);
// If we failed ...
! if (ulsize.LowPart == 0xFFFFFFFF &&
GetLastError() != NO_ERROR )
return PyWin_SetAPIError("GetCompressedFileSize");
! return PyWinObject_FromULARGE_INTEGER(ulsize);
}
%}
! // @pyswig long|GetCompressedFileSize|Determines the compressed size of a file.
%native(GetCompressedFileSize) MyGetCompressedFileSize;
***************
*** 789,805 ****
if (!PyWinObject_AsHANDLE(obHandle, &hFile))
return NULL;
! DWORD dwSizeLow=0, dwSizeHigh=0;
Py_BEGIN_ALLOW_THREADS
! dwSizeLow = GetFileSize (hFile, &dwSizeHigh);
Py_END_ALLOW_THREADS
// If we failed ...
! if (dwSizeLow == 0xFFFFFFFF &&
GetLastError() != NO_ERROR )
return PyWin_SetAPIError("GetFileSize");
! return PyLong_FromTwoInts(dwSizeHigh, dwSizeLow);
}
%}
! // @pyswig <o PyLARGE_INTEGER>|GetFileSize|Determines the size of a file.
%native(GetFileSize) MyGetFileSize;
--- 792,808 ----
if (!PyWinObject_AsHANDLE(obHandle, &hFile))
return NULL;
! ULARGE_INTEGER ulsize;
Py_BEGIN_ALLOW_THREADS
! ulsize.LowPart = GetFileSize (hFile, &ulsize.HighPart);
Py_END_ALLOW_THREADS
// If we failed ...
! if (ulsize.LowPart == 0xFFFFFFFF &&
GetLastError() != NO_ERROR )
return PyWin_SetAPIError("GetFileSize");
! return PyWinObject_FromULARGE_INTEGER(ulsize);
}
%}
! // @pyswig long|GetFileSize|Determines the size of a file.
%native(GetFileSize) MyGetFileSize;
***************
*** 868,872 ****
void *buf = NULL;
- PyBufferProcs *pb = NULL;
bufSize = PyInt_AsLong(obBuf);
--- 871,874 ----
***************
*** 876,881 ****
if (obRet==NULL)
return NULL;
! pb = obRet->ob_type->tp_as_buffer;
! (*pb->bf_getreadbuffer)(obRet, 0, &buf);
}
else{
--- 878,886 ----
if (obRet==NULL)
return NULL;
! // This should never fail
! if (!PyWinObject_AsWriteBuffer(obRet, &buf, &bufSize)){
! Py_DECREF(obRet);
! return NULL;
! }
}
else{
***************
*** 1533,1548 ****
if (!PyWinObject_AsHANDLE(obHandle, &handle))
return NULL;
! long offHigh;
! unsigned offLow;
! if (!PyLong_AsTwoInts(obOffset, (int *)&offHigh, &offLow))
return NULL;
Py_BEGIN_ALLOW_THREADS
! offLow = SetFilePointer(handle, offLow, &offHigh, iMethod);
Py_END_ALLOW_THREADS
// If we failed ...
! if (offLow == 0xFFFFFFFF &&
GetLastError() != NO_ERROR )
return PyWin_SetAPIError("SetFilePointer");
! return PyLong_FromTwoInts(offHigh, offLow);
}
%}
--- 1538,1554 ----
if (!PyWinObject_AsHANDLE(obHandle, &handle))
return NULL;
!
! LARGE_INTEGER offset;
! if (!PyWinObject_AsLARGE_INTEGER(obOffset, &offset))
return NULL;
+
Py_BEGIN_ALLOW_THREADS
! offset.LowPart = SetFilePointer(handle, offset.LowPart, &offset.HighPart, iMethod);
Py_END_ALLOW_THREADS
// If we failed ...
! if (offset.LowPart == 0xFFFFFFFF &&
GetLastError() != NO_ERROR )
return PyWin_SetAPIError("SetFilePointer");
! return PyWinObject_FromLARGE_INTEGER(offset);
}
%}
***************
*** 1643,1651 ****
PyObject *obOverlapped = NULL;
DWORD dwBufSize = 0;
- PyObject *rv = NULL;
PyObject *obListening = NULL;
PyObject *obAccepting = NULL;
PyObject *obBuf = NULL;
- PyObject *pORB = NULL;
void *buf = NULL;
DWORD cBytesRecvd = 0;
--- 1649,1655 ----
***************
*** 1706,1731 ****
}
! if (obBuf->ob_type->tp_as_buffer && obBuf->ob_type->tp_as_buffer->bf_getwritebuffer)
! {
! pORB = obBuf;
! Py_INCREF(pORB);
! pb = pORB->ob_type->tp_as_buffer;
! dwBufSize = (*pb->bf_getwritebuffer)(pORB, 0, &buf);
! if (dwBufSize==(DWORD)-1 && PyErr_Occurred())
! goto Error;
! if (dwBufSize < (DWORD)iMinBufferSize )
{
! PyErr_Format(
! PyExc_ValueError,
! "Second param must be at least %ld bytes long",
! iMinBufferSize);
! goto Error;
! }
! }
! else
! {
! PyErr_SetString(PyExc_TypeError, "Second param must be a buffer object");
return NULL;
! }
// Phew... finally, all the arguments are converted...
--- 1710,1723 ----
}
! if (!PyWinObject_AsWriteBuffer(obBuf, &buf, &dwBufSize))
! return NULL;
! if (dwBufSize < (DWORD)iMinBufferSize )
{
! PyErr_Format(
! PyExc_ValueError,
! "Second param must be at least %ld bytes long",
! iMinBufferSize);
return NULL;
! }
// Phew... finally, all the arguments are converted...
***************
*** 1745,1761 ****
rc = WSAGetLastError();
if (rc != ERROR_IO_PENDING)
! {
! PyWin_SetAPIError("AcceptEx", WSAGetLastError());
! goto Error;
! }
}
! Py_DECREF(pORB);
! rv = PyInt_FromLong(rc);
! Cleanup:
! return rv;
! Error:
! Py_DECREF(pORB);
! rv = NULL;
! goto Cleanup;
}
--- 1737,1743 ----
rc = WSAGetLastError();
if (rc != ERROR_IO_PENDING)
! return PyWin_SetAPIError("AcceptEx", WSAGetLastError());
}
! return PyInt_FromLong(rc);
}
***************
*** 1864,1889 ****
}
iMinBufferSize = (wsProtInfo.iMaxSockAddr + 16) * 2;
! if (obBuf->ob_type->tp_as_buffer && obBuf->ob_type->tp_as_buffer->bf_getreadbuffer)
! {
! pORB = obBuf;
! Py_INCREF(pORB);
! pb = pORB->ob_type->tp_as_buffer;
! dwBufSize = (*pb->bf_getreadbuffer)(pORB, 0, &buf);
! if (dwBufSize==(DWORD)-1 && PyErr_Occurred())
! goto Error;
! if (dwBufSize < (DWORD)iMinBufferSize )
! {
! PyErr_Format(
! PyExc_ValueError,
! "Second param must be at least %ld bytes long",
! iMinBufferSize);
! goto Error;
! }
! }
! else
{
! PyErr_SetString(PyExc_TypeError, "Second param must be a buffer object");
! return NULL;
}
--- 1846,1859 ----
}
iMinBufferSize = (wsProtInfo.iMaxSockAddr + 16) * 2;
+ if (!PyWinObject_AsReadBuffer(obBuf, &buf, &dwBufSize))
+ return NULL;
! if (dwBufSize < (DWORD)iMinBufferSize )
{
! PyErr_Format(
! PyExc_ValueError,
! "Second param must be at least %ld bytes long",
! iMinBufferSize);
! goto Error;
}
***************
*** 2059,2080 ****
}
! if (PyString_Check(obBuf))
! {
! wsBuf.buf = PyString_AS_STRING(obBuf);
! wsBuf.len = PyString_GET_SIZE(obBuf);
! }
! else if (obBuf->ob_type->tp_as_buffer && obBuf->ob_type->tp_as_buffer->bf_getreadbuffer)
! {
! Py_INCREF(obBuf);
! pb = obBuf->ob_type->tp_as_buffer;
! wsBuf.len = (*pb->bf_getreadbuffer)(obBuf, 0, (void **)&wsBuf.buf);
! if (wsBuf.len==(u_long)-1 && PyErr_Occurred())
! return NULL;
! }
! else
! {
! PyErr_SetString(PyExc_TypeError, "Second param must be a buffer object or a string.");
return NULL;
- }
Py_BEGIN_ALLOW_THREADS;
--- 2029,2034 ----
}
! if (!PyWinObject_AsReadBuffer(obBuf, (void **)&wsBuf.buf, &wsBuf.len, FALSE))
return NULL;
Py_BEGIN_ALLOW_THREADS;
***************
*** 2171,2187 ****
}
! if (obBuf->ob_type->tp_as_buffer && obBuf->ob_type->tp_as_buffer->bf_getwritebuffer)
! {
! Py_INCREF(obBuf);
! pb = obBuf->ob_type->tp_as_buffer;
! wsBuf.len = (*pb->bf_getwritebuffer)(obBuf, 0, (void **)&wsBuf.buf);
! if (wsBuf.len==(u_long)-1 && PyErr_Occurred())
! return NULL;
! }
! else
! {
! PyErr_SetString(PyExc_TypeError, "Second param must be a PyOVERLAPPEDReadBuffer object");
return NULL;
- }
Py_BEGIN_ALLOW_THREADS;
--- 2125,2130 ----
}
! if (!PyWinObject_AsWriteBuffer(obBuf, (void **)&wsBuf.buf, &wsBuf.len, FALSE))
return NULL;
Py_BEGIN_ALLOW_THREADS;
***************
*** 2241,2244 ****
--- 2184,2188 ----
#define SO_UPDATE_ACCEPT_CONTEXT SO_UPDATE_ACCEPT_CONTEXT
+ #define SO_UPDATE_CONNECT_CONTEXT SO_UPDATE_CONNECT_CONTEXT
#define SO_CONNECT_TIME SO_CONNECT_TIME
***************
*** 2273,2292 ****
#endif // MS_WINCE
- // The communications related functions.
- // The COMM port enhancements were added by Mark Hammond, and are
- // (c) 2000-2001, ActiveState Tools Corp.
-
- %{
- // The comms port helpers.
- extern PyObject *PyWinObject_FromCOMSTAT(const COMSTAT *pCOMSTAT);
- extern BOOL PyWinObject_AsCOMSTAT(PyObject *ob, COMSTAT **ppCOMSTAT, BOOL bNoneOK = TRUE);
- extern BOOL PyWinObject_AsDCB(PyObject *ob, DCB **ppDCB, BOOL bNoneOK = TRUE);
- extern PyObject *PyWinObject_FromDCB(const DCB *pDCB);
- extern PyObject *PyWinMethod_NewDCB(PyObject *self, PyObject *args);
- extern PyObject *PyWinObject_FromCOMMTIMEOUTS( COMMTIMEOUTS *p);
- extern BOOL PyWinObject_AsCOMMTIMEOUTS( PyObject *ob, COMMTIMEOUTS *p);
-
- %}
-
%native (DCB) PyWinMethod_NewDCB;
--- 2217,2220 ----
***************
*** 2672,2675 ****
--- 2600,2608 ----
static GetFullPathNameTransactedAfunc pfnGetFullPathNameTransactedA = NULL;
+ typedef BOOL (WINAPI *Wow64DisableWow64FsRedirectionfunc)(PVOID*);
+ static Wow64DisableWow64FsRedirectionfunc pfnWow64DisableWow64FsRedirection = NULL;
+ typedef BOOL (WINAPI *Wow64RevertWow64FsRedirectionfunc)(PVOID);
+ static Wow64RevertWow64FsRedirectionfunc pfnWow64RevertWow64FsRedirection = NULL;
+
/* FILE_INFO_BY_HANDLE_CLASS and various structs used by this function are in fileextd.h, can be downloaded here:
http://www.microsoft.com/downloads/details.aspx?familyid=1decc547-ab00-4963-a360-e4130ec079b8&displaylang=en
***************
*** 3526,3530 ****
return NULL;
if (obbuf==Py_None){
! obbufout=PyBuffer_New(bytes_requested); // ??? any way to create a writable buffer from Python level ???
if (obbufout==NULL)
return NULL;
--- 3459,3463 ----
return NULL;
if (obbuf==Py_None){
! obbufout=PyBuffer_New(bytes_requested);
if (obbufout==NULL)
return NULL;
***************
*** 4222,4225 ****
--- 4155,4161 ----
case GetFileExInfoStandard: {
WIN32_FILE_ATTRIBUTE_DATA *pa = (WIN32_FILE_ATTRIBUTE_DATA *)p;
+ ULARGE_INTEGER fsize;
+ fsize.LowPart=pa->nFileSizeLow;
+ fsize.HighPart=pa->nFileSizeHigh;
return Py_BuildValue("iNNNN",
pa->dwFileAttributes,
***************
*** 4227,4231 ****
PyWinObject_FromFILETIME(pa->ftLastAccessTime),
PyWinObject_FromFILETIME(pa->ftLastWriteTime),
! PyLong_FromTwoInts(pa->nFileSizeHigh, pa->nFileSizeLow));
break;
}
--- 4163,4167 ----
PyWinObject_FromFILETIME(pa->ftLastAccessTime),
PyWinObject_FromFILETIME(pa->ftLastWriteTime),
! PyWinObject_FromULARGE_INTEGER(fsize));
break;
}
***************
*** 5093,5098 ****
%init %{
! PyDict_SetItemString(d, "error", PyWinExc_ApiError);
! PyDict_SetItemString(d, "INVALID_HANDLE_VALUE", PyWinLong_FromHANDLE(INVALID_HANDLE_VALUE));
for (PyMethodDef *pmd = win32fileMethods;pmd->ml_name;pmd++)
--- 5029,5042 ----
%init %{
!
! if (PyType_Ready(&FindFileIterator_Type) == -1
! ||PyType_Ready(&PyDCB::type) == -1
! ||PyType_Ready(&PyCOMSTAT::type) == -1)
! PYWIN_MODULE_INIT_RETURN_ERROR;
!
! if (PyDict_SetItemString(d, "error", PyWinExc_ApiError) == -1)
! PYWIN_MODULE_INIT_RETURN_ERROR;
! if (PyDict_SetItemString(d, "INVALID_HANDLE_VALUE", PyWinLong_FromHANDLE(INVALID_HANDLE_VALUE)) == -1)
! PYWIN_MODULE_INIT_RETURN_ERROR;
for (PyMethodDef *pmd = win32fileMethods;pmd->ml_name;pmd++)
***************
*** 5191,5194 ****
--- 5135,5140 ----
pfnGetFullPathNameTransactedA=(GetFullPathNameTransactedAfunc)GetProcAddress(hmodule, "GetFullPathNameTransactedA");
// pfnGetFileInformationByHandleEx=(GetFileInformationByHandleExfunc)GetProcAddress(hmodule, "GetFileInformationByHandleEx");
+ pfnWow64DisableWow64FsRedirection=(Wow64DisableWow64FsRedirectionfunc)GetProcAddress(hmodule, "Wow64DisableWow64FsRedirection");
+ pfnWow64RevertWow64FsRedirection=(Wow64RevertWow64FsRedirectionfunc)GetProcAddress(hmodule, "Wow64RevertWow64FsRedirection");
}
***************
*** 5265,5268 ****
--- 5211,5221 ----
#define FILE_READ_ONLY FILE_READ_ONLY
+ #define TF_DISCONNECT TF_DISCONNECT
+ #define TF_REUSE_SOCKET TF_REUSE_SOCKET
+ #define TF_WRITE_BEHIND TF_WRITE_BEHIND
+ #define TF_USE_DEFAULT_WORKER TF_USE_DEFAULT_WORKER
+ #define TF_USE_SYSTEM_THREAD TF_USE_SYSTEM_THREAD
+ #define TF_USE_KERNEL_APC TF_USE_KERNEL_APC
+
// flags used with CopyFileEx
#define COPY_FILE_ALLOW_DECRYPTED_DESTINATION COPY_FILE_ALLOW_DECRYPTED_DESTINATION
Index: win32rasmodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32rasmodule.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** win32rasmodule.cpp 8 Dec 2008 13:16:38 -0000 1.14
--- win32rasmodule.cpp 11 Dec 2008 00:25:40 -0000 1.15
***************
*** 124,129 ****
static void deallocFunc(PyObject *ob);
! static PyObject *getattr(PyObject *self, char *name);
! static int setattr(PyObject *self, char *name, PyObject *v);
static PyTypeObject type;
RASDIALEXTENSIONS m_ext;
--- 124,129 ----
static void deallocFunc(PyObject *ob);
! static PyObject *getattro(PyObject *self, PyObject *obname);
! static int setattro(PyObject *self, PyObject *obname, PyObject *v);
static PyTypeObject type;
RASDIALEXTENSIONS m_ext;
***************
*** 162,167 ****
PyRASDIALEXTENSIONS::deallocFunc, /* tp_dealloc */
0, /* tp_print */
! PyRASDIALEXTENSIONS::getattr, /* tp_getattr */
! PyRASDIALEXTENSIONS::setattr, /* tp_setattr */
0, /* tp_compare */
0, /* tp_repr */
--- 162,167 ----
PyRASDIALEXTENSIONS::deallocFunc, /* tp_dealloc */
0, /* tp_print */
! 0, /* tp_getattr */
! 0, /* tp_setattr */
0, /* tp_compare */
0, /* tp_repr */
***************
*** 172,178 ****
0, /* tp_call */
0, /* tp_str */
! 0, /*tp_getattro*/
! 0, /*tp_setattro*/
0, /*tp_as_buffer*/
};
--- 172,197 ----
0, /* tp_call */
0, /* tp_str */
! PyRASDIALEXTENSIONS::getattro, /* tp_getattro */
! PyRASDIALEXTENSIONS::setattro, /* tp_setattro */
0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT, // tp_flags;
+ "An object that describes a Win32 RASDIALEXTENSIONS structure", // tp_doc
+ 0, // tp_traverse;
+ 0, // tp_clear
+ 0, // tp_richcompare;
+ 0, // tp_weaklistoffset;
+ 0, // tp_iter
+ 0, // iternextfunc tp_iternext
+ 0, // tp_methods
+ 0, // tp_members
+ 0, // tp_getset;
+ 0, // tp_base;
+ 0, // tp_dict;
+ 0, // tp_descr_get;
+ 0, // tp_descr_set;
+ 0, // tp_dictoffset;
+ 0, // tp_init;
+ 0, // tp_alloc;
+ 0, // newfunc tp_new;
};
***************
*** 192,197 ****
}
! PyObject *PyRASDIALEXTENSIONS::getattr(PyObject *self, char *name)
{
PyRASDIALEXTENSIONS *py = (PyRASDIALEXTENSIONS *)self;
// @prop integer|dwfOptions|(fOptions may also be used)
--- 211,219 ----
}
! PyObject *PyRASDIALEXTENSIONS::getattro(PyObject *self, PyObject *obname)
{
+ char *name=PYWIN_ATTR_CONVERT(obname);
+ if (na...
[truncated message content] |