Update of /cvsroot/pywin32/pywin32/win32/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1177/win32/src
Modified Files:
PyACL.cpp PyDEVMODE.cpp PyHANDLE.cpp PyIID.cpp
PyOVERLAPPED.cpp PySECURITY_ATTRIBUTES.cpp
PySECURITY_DESCRIPTOR.cpp PySID.cpp PyTime.cpp
PyWAVEFORMATEX.cpp PyWinTypes.h mmapfilemodule.cpp odbc.cpp
win2krasmodule.cpp win32api_display.cpp win32consolemodule.cpp
win32file_comm.cpp win32gui.i win32helpmodule.cpp
win32process.i win32security_sspi.cpp win32service.i
win32trace.cpp
Log Message:
Many 'benign' changes from the py3k branch, mainly around using
PYWIN_OBJECT_HEAD and whitespace related changes around the type defs.
Index: win32process.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32process.i,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** win32process.i 13 Nov 2008 11:11:58 -0000 1.35
--- win32process.i 3 Dec 2008 22:34:21 -0000 1.36
***************
*** 103,113 ****
PyTypeObject PySTARTUPINFOType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PySTARTUPINFO",
sizeof(PySTARTUPINFO),
0,
PySTARTUPINFO::deallocFunc, /* tp_dealloc */
! 0, /* tp_print */
PySTARTUPINFO::getattr, /* tp_getattr */
PySTARTUPINFO::setattr, /* tp_setattr */
--- 103,112 ----
PyTypeObject PySTARTUPINFOType =
{
! PYWIN_OBJECT_HEAD
"PySTARTUPINFO",
sizeof(PySTARTUPINFO),
0,
PySTARTUPINFO::deallocFunc, /* tp_dealloc */
! 0, /* tp_print */
PySTARTUPINFO::getattr, /* tp_getattr */
PySTARTUPINFO::setattr, /* tp_setattr */
***************
*** 115,123 ****
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
! 0,
0, /* tp_call */
! 0, /* tp_str */
};
--- 114,122 ----
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
! 0, /* tp_hash */
0, /* tp_call */
! 0, /* tp_str */
};
Index: win32trace.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32trace.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** win32trace.cpp 13 Nov 2008 11:11:58 -0000 1.16
--- win32trace.cpp 3 Dec 2008 22:34:21 -0000 1.17
***************
*** 192,197 ****
static PyTypeObject PyTraceObjectType = {
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyTraceObject",
sizeof(PyTraceObject),
--- 192,196 ----
static PyTypeObject PyTraceObjectType = {
! PYWIN_OBJECT_HEAD
"PyTraceObject",
sizeof(PyTraceObject),
Index: PySECURITY_DESCRIPTOR.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PySECURITY_DESCRIPTOR.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** PySECURITY_DESCRIPTOR.cpp 13 Nov 2008 11:11:58 -0000 1.20
--- PySECURITY_DESCRIPTOR.cpp 3 Dec 2008 22:34:21 -0000 1.21
***************
*** 706,726 ****
PYWINTYPES_EXPORT PyTypeObject PySECURITY_DESCRIPTORType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PySECURITY_DESCRIPTOR",
sizeof(PySECURITY_DESCRIPTOR),
0,
PySECURITY_DESCRIPTOR::deallocFunc, /* tp_dealloc */
! 0, /* tp_print */
PySECURITY_DESCRIPTOR::getattr, /* tp_getattr */
PySECURITY_DESCRIPTOR::setattr, /* tp_setattr */
! 0, /* tp_compare */
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
! 0,
0, /* tp_call */
! 0, /* tp_str */
0, /*tp_getattro*/
0, /*tp_setattro*/
--- 706,725 ----
PYWINTYPES_EXPORT PyTypeObject PySECURITY_DESCRIPTORType =
{
! PYWIN_OBJECT_HEAD
"PySECURITY_DESCRIPTOR",
sizeof(PySECURITY_DESCRIPTOR),
0,
PySECURITY_DESCRIPTOR::deallocFunc, /* tp_dealloc */
! 0, /* tp_print */
PySECURITY_DESCRIPTOR::getattr, /* tp_getattr */
PySECURITY_DESCRIPTOR::setattr, /* tp_setattr */
! 0, /* tp_compare */
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
! 0, /* tp_hash */
0, /* tp_call */
! 0, /* tp_str */
0, /*tp_getattro*/
0, /*tp_setattro*/
Index: win32api_display.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32api_display.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** win32api_display.cpp 6 Feb 2008 18:42:51 -0000 1.7
--- win32api_display.cpp 3 Dec 2008 22:34:21 -0000 1.8
***************
*** 1,4 ****
// @doc - This file contains autoduck documentation
- // #define UNICODE
#include "PyWinTypes.h"
#include "structmember.h"
--- 1,3 ----
***************
*** 47,52 ****
PyTypeObject PyDISPLAY_DEVICEType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyDISPLAY_DEVICE",
sizeof(PyDISPLAY_DEVICE),
--- 46,50 ----
PyTypeObject PyDISPLAY_DEVICEType =
{
! PYWIN_OBJECT_HEAD
"PyDISPLAY_DEVICE",
sizeof(PyDISPLAY_DEVICE),
***************
*** 143,149 ****
{
PDISPLAY_DEVICE pdisplay_device=&((PyDISPLAY_DEVICE *)self)->display_device;
! char *name=PyString_AsString(obname);
if (name==NULL)
return NULL;
if (strcmp(name,"DeviceName")==0)
if (pdisplay_device->DeviceName[31]==0) // in case DeviceName fills space and has no trailing NULL
--- 141,148 ----
{
PDISPLAY_DEVICE pdisplay_device=&((PyDISPLAY_DEVICE *)self)->display_device;
! char *name=PYWIN_ATTR_CONVERT(obname);
if (name==NULL)
return NULL;
+
if (strcmp(name,"DeviceName")==0)
if (pdisplay_device->DeviceName[31]==0) // in case DeviceName fills space and has no trailing NULL
***************
*** 175,184 ****
int PyDISPLAY_DEVICE::setattro(PyObject *self, PyObject *obname, PyObject *obvalue)
{
! char *name;
! TCHAR *value=NULL;
! DWORD valuelen;
! name=PyString_AsString(obname);
if (name==NULL)
return -1;
if (strcmp(name,"DeviceName")==0){
PDISPLAY_DEVICE pdisplay_device=&((PyDISPLAY_DEVICE *)self)->display_device;
--- 174,184 ----
int PyDISPLAY_DEVICE::setattro(PyObject *self, PyObject *obname, PyObject *obvalue)
{
! char *name=PYWIN_ATTR_CONVERT(obname);
if (name==NULL)
return -1;
+
+ TCHAR *value=NULL;
+ DWORD valuelen;
+
if (strcmp(name,"DeviceName")==0){
PDISPLAY_DEVICE pdisplay_device=&((PyDISPLAY_DEVICE *)self)->display_device;
Index: win32consolemodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32consolemodule.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** win32consolemodule.cpp 7 Oct 2008 15:21:49 -0000 1.14
--- win32consolemodule.cpp 3 Dec 2008 22:34:21 -0000 1.15
***************
*** 149,154 ****
static PyTypeObject PySMALL_RECTType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PySMALL_RECT",
sizeof(PySMALL_RECT),
--- 149,153 ----
static PyTypeObject PySMALL_RECTType =
{
! PYWIN_OBJECT_HEAD
"PySMALL_RECT",
sizeof(PySMALL_RECT),
***************
*** 169,173 ****
PyObject_GenericSetAttr, // tp_setattro
0, // tp_as_buffer;
! 0, // tp_flags;
"Wrapper for a SMALL_RECT struct. Create using PySMALL_RECTType(Left, Top, Right, Bottom)", // tp_doc
0, // traverseproc tp_traverse;
--- 168,172 ----
PyObject_GenericSetAttr, // tp_setattro
0, // tp_as_buffer;
! Py_TPFLAGS_DEFAULT, // tp_flags;
"Wrapper for a SMALL_RECT struct. Create using PySMALL_RECTType(Left, Top, Right, Bottom)", // tp_doc
0, // traverseproc tp_traverse;
***************
*** 299,304 ****
static PyTypeObject PyCOORDType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyCOORD",
sizeof(PyCOORD),
--- 298,302 ----
static PyTypeObject PyCOORDType =
{
! PYWIN_OBJECT_HEAD
"PyCOORD",
sizeof(PyCOORD),
***************
*** 319,323 ****
PyObject_GenericSetAttr, // tp_setattro
0, // tp_as_buffer;
! 0, // tp_flags;
"Wrapper for a COORD struct. Create using PyCOORDType(X,Y)", // tp_doc
0, // traverseproc tp_traverse;
--- 317,321 ----
PyObject_GenericSetAttr, // tp_setattro
0, // tp_as_buffer;
! Py_TPFLAGS_DEFAULT, // tp_flags;
"Wrapper for a COORD struct. Create using PyCOORDType(X,Y)", // tp_doc
0, // traverseproc tp_traverse;
***************
*** 486,490 ****
{
INPUT_RECORD *pir=&((PyINPUT_RECORD *)self)->input_record;
! char *name=PyString_AsString(obname);
if (name==NULL)
return NULL;
--- 484,488 ----
{
INPUT_RECORD *pir=&((PyINPUT_RECORD *)self)->input_record;
! char *name=PYWIN_ATTR_CONVERT(obname);
if (name==NULL)
return NULL;
***************
*** 535,539 ****
INPUT_RECORD *pir=&((PyINPUT_RECORD *)self)->input_record;
char *name;
! name=PyString_AsString(obname);
if (name==NULL)
return -1;
--- 533,537 ----
INPUT_RECORD *pir=&((PyINPUT_RECORD *)self)->input_record;
char *name;
! name=PYWIN_ATTR_CONVERT(obname);
if (name==NULL)
return -1;
***************
*** 555,558 ****
--- 553,557 ----
return -1;
}
+
#if (PY_VERSION_HEX < 0x02030000)
*dest_ptr=PyLong_AsUnsignedLong(obvalue);
***************
*** 608,613 ****
static PyTypeObject PyINPUT_RECORDType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyINPUT_RECORD",
sizeof(PyINPUT_RECORD),
--- 607,611 ----
static PyTypeObject PyINPUT_RECORDType =
{
! PYWIN_OBJECT_HEAD
"PyINPUT_RECORD",
sizeof(PyINPUT_RECORD),
***************
*** 628,632 ****
PyINPUT_RECORD::tp_setattro, // tp_setattro
0, // tp_as_buffer;
! 0, // tp_flags;
"Wrapper for a INPUT_RECORD struct. Create using PyINPUT_RECORDType(EventType)", // tp_doc
0, // traverseproc tp_traverse;
--- 626,630 ----
PyINPUT_RECORD::tp_setattro, // tp_setattro
0, // tp_as_buffer;
! Py_TPFLAGS_DEFAULT, // tp_flags;
"Wrapper for a INPUT_RECORD struct. Create using PyINPUT_RECORDType(EventType)", // tp_doc
0, // traverseproc tp_traverse;
***************
*** 1516,1521 ****
PyTypeObject PyConsoleScreenBufferType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyConsoleScreenBuffer",
sizeof(PyConsoleScreenBuffer),
--- 1514,1518 ----
PyTypeObject PyConsoleScreenBufferType =
{
! PYWIN_OBJECT_HEAD
"PyConsoleScreenBuffer",
sizeof(PyConsoleScreenBuffer),
***************
*** 1536,1540 ****
PyObject_GenericSetAttr, // tp_setattro
0, // tp_as_buffer
! 0, // tp_flags
"Handle to a console screen buffer.\nCreate using CreateConsoleScreenBuffer or PyConsoleScreenBufferType(Handle)", // tp_doc
0, // tp_traverse
--- 1533,1537 ----
PyObject_GenericSetAttr, // tp_setattro
0, // tp_as_buffer
! Py_TPFLAGS_DEFAULT, // tp_flags
"Handle to a console screen buffer.\nCreate using CreateConsoleScreenBuffer or PyConsoleScreenBufferType(Handle)", // tp_doc
0, // tp_traverse
Index: win32security_sspi.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32security_sspi.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** win32security_sspi.cpp 12 Aug 2007 08:16:29 -0000 1.9
--- win32security_sspi.cpp 3 Dec 2008 22:34:21 -0000 1.10
***************
*** 88,93 ****
PyTypeObject PySecBufferDescType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PySecBufferDesc",
sizeof(PySecBufferDesc),
--- 88,92 ----
PyTypeObject PySecBufferDescType =
{
! PYWIN_OBJECT_HEAD
"PySecBufferDesc",
sizeof(PySecBufferDesc),
***************
*** 314,319 ****
PyTypeObject PySecBufferType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PySecBuffer",
sizeof(PySecBuffer),
--- 313,317 ----
PyTypeObject PySecBufferType =
{
! PYWIN_OBJECT_HEAD
"PySecBuffer",
sizeof(PySecBuffer),
***************
*** 412,416 ****
{
PSecBuffer psecbuffer=((PySecBuffer *)self)->GetSecBuffer();
! char *name=PyString_AsString(obname);
if (name==NULL)
return NULL;
--- 410,414 ----
{
PSecBuffer psecbuffer=((PySecBuffer *)self)->GetSecBuffer();
! char *name=PYWIN_ATTR_CONVERT(obname);
if (name==NULL)
return NULL;
***************
*** 426,430 ****
void *value;
DWORD valuelen;
! name=PyString_AsString(obname);
if (name==NULL)
return -1;
--- 424,428 ----
void *value;
DWORD valuelen;
! name=PYWIN_ATTR_CONVERT(obname);
if (name==NULL)
return -1;
***************
*** 508,513 ****
PyTypeObject PyCtxtHandleType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyCtxtHandle",
sizeof(PyCtxtHandle),
--- 506,510 ----
PyTypeObject PyCtxtHandleType =
{
! PYWIN_OBJECT_HEAD
"PyCtxtHandle",
sizeof(PyCtxtHandle),
***************
*** 1064,1069 ****
PyTypeObject PyCredHandleType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyCredHandle",
sizeof(PyCredHandle),
--- 1061,1065 ----
PyTypeObject PyCredHandleType =
{
! PYWIN_OBJECT_HEAD
"PyCredHandle",
sizeof(PyCredHandle),
Index: PySID.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PySID.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** PySID.cpp 13 Nov 2008 11:11:58 -0000 1.13
--- PySID.cpp 3 Dec 2008 22:34:21 -0000 1.14
***************
*** 200,225 ****
PYWINTYPES_EXPORT PyTypeObject PySIDType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PySID",
sizeof(PySID),
0,
PySID::deallocFunc, /* tp_dealloc */
! 0, /* tp_print */
PySID::getattr, /* tp_getattr */
! 0, /* tp_setattr */
// @pymeth __cmp__|Used when objects are compared.
! PySID::compareFunc, /* tp_compare */
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
0,
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*/
};
--- 200,224 ----
PYWINTYPES_EXPORT PyTypeObject PySIDType =
{
! PYWIN_OBJECT_HEAD
"PySID",
sizeof(PySID),
0,
PySID::deallocFunc, /* tp_dealloc */
! 0, /* tp_print */
PySID::getattr, /* tp_getattr */
! 0, /* tp_setattr */
// @pymeth __cmp__|Used when objects are compared.
! PySID::compareFunc, /* tp_compare */
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
0,
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*/
};
Index: PyOVERLAPPED.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PyOVERLAPPED.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** PyOVERLAPPED.cpp 25 May 2008 00:34:23 -0000 1.14
--- PyOVERLAPPED.cpp 3 Dec 2008 22:34:21 -0000 1.15
***************
*** 64,85 ****
PYWINTYPES_EXPORT PyTypeObject PyOVERLAPPEDType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyOVERLAPPED",
sizeof(PyOVERLAPPED),
0,
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 */
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
! PyOVERLAPPED::hashFunc, /* tp_hash */
0, /* tp_call */
! 0, /* tp_str */
};
--- 64,84 ----
PYWINTYPES_EXPORT PyTypeObject PyOVERLAPPEDType =
{
! PYWIN_OBJECT_HEAD
"PyOVERLAPPED",
sizeof(PyOVERLAPPED),
0,
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 */
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
! PyOVERLAPPED::hashFunc, /* tp_hash */
0, /* tp_call */
! 0, /* tp_str */
};
Index: PySECURITY_ATTRIBUTES.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PySECURITY_ATTRIBUTES.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** PySECURITY_ATTRIBUTES.cpp 27 Jan 2005 01:46:44 -0000 1.7
--- PySECURITY_ATTRIBUTES.cpp 3 Dec 2008 22:34:21 -0000 1.8
***************
*** 66,86 ****
PYWINTYPES_EXPORT PyTypeObject PySECURITY_ATTRIBUTESType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PySECURITY_ATTRIBUTES",
sizeof(PySECURITY_ATTRIBUTES),
0,
PySECURITY_ATTRIBUTES::deallocFunc, /* tp_dealloc */
! 0, /* tp_print */
PySECURITY_ATTRIBUTES::getattr, /* tp_getattr */
PySECURITY_ATTRIBUTES::setattr, /* tp_setattr */
! 0, /* tp_compare */
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
! 0,
0, /* tp_call */
! 0, /* tp_str */
};
--- 66,85 ----
PYWINTYPES_EXPORT PyTypeObject PySECURITY_ATTRIBUTESType =
{
! PYWIN_OBJECT_HEAD
"PySECURITY_ATTRIBUTES",
sizeof(PySECURITY_ATTRIBUTES),
0,
PySECURITY_ATTRIBUTES::deallocFunc, /* tp_dealloc */
! 0, /* tp_print */
PySECURITY_ATTRIBUTES::getattr, /* tp_getattr */
PySECURITY_ATTRIBUTES::setattr, /* tp_setattr */
! 0, /* tp_compare */
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
! 0, /* tp_hash */
0, /* tp_call */
! 0, /* tp_str */
};
***************
*** 92,95 ****
--- 91,97 ----
{NULL}
};
+
+
+
// @comm On platforms that support security descriptor operations, SECURITY_DESCRIPTOR
// defaults to a blank security descriptor with no owner, group, dacl, or sacl.
***************
*** 108,112 ****
m_sa.lpSecurityDescriptor=((PySECURITY_DESCRIPTOR *)m_obSD)->GetSD();
// On win95/98/me (or any platform that doesn't have NT security) the
! // initialization of the SECURITY_DESCRIPTOR shoudl fail, leaving the
// sd NULL.
if (m_sa.lpSecurityDescriptor==NULL){
--- 110,114 ----
m_sa.lpSecurityDescriptor=((PySECURITY_DESCRIPTOR *)m_obSD)->GetSD();
// On win95/98/me (or any platform that doesn't have NT security) the
! // initialization of the SECURITY_DESCRIPTOR should fail, leaving the
// sd NULL.
if (m_sa.lpSecurityDescriptor==NULL){
Index: PyWinTypes.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinTypes.h,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -d -r1.53 -r1.54
*** PyWinTypes.h 13 Nov 2008 04:04:51 -0000 1.53
--- PyWinTypes.h 3 Dec 2008 22:34:21 -0000 1.54
***************
*** 21,24 ****
--- 21,41 ----
#include "windows.h"
+ // Helpers for our types.
+ #if (PY_VERSION_HEX < 0x03000000)
+ #define PYWIN_OBJECT_HEAD PyObject_HEAD_INIT(&PyType_Type) 0,
+ #define PYWIN_ATTR_CONVERT PyString_AsString
+
+ #else // Py3k definitions
+ // Macro to handle PyObject layout changes in Py3k
+ #define PYWIN_OBJECT_HEAD PyVarObject_HEAD_INIT(NULL, 0)
+
+ /* Attribute names are passed as Unicode in Py3k, so use a macro to
+ switch between string and unicode conversion. This function is not
+ documented, but is used extensively in the Python codebase itself,
+ so it's reasonable to assume it won't disappear anytime soon.
+ */
+ #define PYWIN_ATTR_CONVERT _PyUnicode_AsString
+ #endif // PY_VERSION_HEX
+
// See PEP-353 - this is the "official" test...
#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
Index: win32gui.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32gui.i,v
retrieving revision 1.119
retrieving revision 1.120
diff -C2 -d -r1.119 -r1.120
*** win32gui.i 11 Nov 2008 00:17:55 -0000 1.119
--- win32gui.i 3 Dec 2008 22:34:21 -0000 1.120
***************
*** 866,876 ****
PyTypeObject PyWNDCLASSType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyWNDCLASS",
sizeof(PyWNDCLASS),
0,
PyWNDCLASS::deallocFunc, /* tp_dealloc */
! 0, /* tp_print */
PyWNDCLASS::getattr, /* tp_getattr */
PyWNDCLASS::setattr, /* tp_setattr */
--- 866,875 ----
PyTypeObject PyWNDCLASSType =
{
! PYWIN_OBJECT_HEAD
"PyWNDCLASS",
sizeof(PyWNDCLASS),
0,
PyWNDCLASS::deallocFunc, /* tp_dealloc */
! 0, /* tp_print */
PyWNDCLASS::getattr, /* tp_getattr */
PyWNDCLASS::setattr, /* tp_setattr */
***************
*** 878,886 ****
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
! 0,
0, /* tp_call */
! 0, /* tp_str */
};
--- 877,885 ----
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
! 0, /* tp_hash */
0, /* tp_call */
! 0, /* tp_str */
};
***************
*** 1085,1095 ****
PyTypeObject PyBITMAPType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyBITMAP",
sizeof(PyBITMAP),
0,
! PyBITMAP::deallocFunc, /* tp_dealloc */
! 0, /* tp_print */
PyBITMAP::getattr, /* tp_getattr */
PyBITMAP::setattr, /* tp_setattr */
--- 1084,1093 ----
PyTypeObject PyBITMAPType =
{
! PYWIN_OBJECT_HEAD
"PyBITMAP",
sizeof(PyBITMAP),
0,
! PyBITMAP::deallocFunc, /* tp_dealloc */
! 0, /* tp_print */
PyBITMAP::getattr, /* tp_getattr */
PyBITMAP::setattr, /* tp_setattr */
***************
*** 1097,1105 ****
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
! 0,
0, /* tp_call */
! 0, /* tp_str */
};
#undef OFF
--- 1095,1103 ----
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
! 0, /* tp_hash */
0, /* tp_call */
! 0, /* tp_str */
};
#undef OFF
***************
*** 1193,1203 ****
PyTypeObject PyLOGFONTType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyLOGFONT",
sizeof(PyLOGFONT),
0,
! PyLOGFONT::deallocFunc, /* tp_dealloc */
! 0, /* tp_print */
PyLOGFONT::getattr, /* tp_getattr */
PyLOGFONT::setattr, /* tp_setattr */
--- 1191,1200 ----
PyTypeObject PyLOGFONTType =
{
! PYWIN_OBJECT_HEAD
"PyLOGFONT",
sizeof(PyLOGFONT),
0,
! PyLOGFONT::deallocFunc, /* tp_dealloc */
! 0, /* tp_print */
PyLOGFONT::getattr, /* tp_getattr */
PyLOGFONT::setattr, /* tp_setattr */
***************
*** 1205,1213 ****
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
! 0,
0, /* tp_call */
! 0, /* tp_str */
};
#undef OFF
--- 1202,1210 ----
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
! 0, /* tp_hash */
0, /* tp_call */
! 0, /* tp_str */
};
#undef OFF
Index: PyTime.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PyTime.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** PyTime.cpp 13 Jul 2007 02:59:33 -0000 1.19
--- PyTime.cpp 3 Dec 2008 22:34:21 -0000 1.20
***************
*** 363,373 ****
PYWINTYPES_EXPORT PyTypeObject PyTimeType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"time",
sizeof(PyTime),
0,
! PyTime::deallocFunc, /* tp_dealloc */
! NULL, /* tp_print */
PyTime::getattrFunc, /* tp_getattr */
0, /* tp_setattr */
--- 363,372 ----
PYWINTYPES_EXPORT PyTypeObject PyTimeType =
{
! PYWIN_OBJECT_HEAD
"time",
sizeof(PyTime),
0,
! PyTime::deallocFunc, /* tp_dealloc */
! NULL, /* tp_print */
PyTime::getattrFunc, /* tp_getattr */
0, /* tp_setattr */
***************
*** 375,379 ****
PyTime::compareFunc, /* tp_compare */
// @pymeth __repr__|Used for repr(ob)
! PyTime::reprFunc, /* tp_repr */
&PyTime_NumberMethods, /* tp_as_number */
0, /* tp_as_sequence */
--- 374,378 ----
PyTime::compareFunc, /* tp_compare */
// @pymeth __repr__|Used for repr(ob)
! PyTime::reprFunc, /* tp_repr */
&PyTime_NumberMethods, /* tp_as_number */
0, /* tp_as_sequence */
Index: win32helpmodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32helpmodule.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** win32helpmodule.cpp 13 Nov 2008 11:11:58 -0000 1.5
--- win32helpmodule.cpp 3 Dec 2008 22:34:21 -0000 1.6
***************
*** 144,149 ****
PyTypeObject PyHH_AKLINKType = {
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyHH_AKLINK", /* tp_name */
sizeof(PyHH_AKLINK), /* tp_basicsize */
--- 144,148 ----
PyTypeObject PyHH_AKLINKType = {
! PYWIN_OBJECT_HEAD
"PyHH_AKLINK", /* tp_name */
sizeof(PyHH_AKLINK), /* tp_basicsize */
***************
*** 165,169 ****
0, /* tp_as_buffer */
0, /* tp_flags */
! 0, /* tp_doc */
};
--- 164,168 ----
0, /* tp_as_buffer */
0, /* tp_flags */
! "A Python object, representing an HH_AKLINK structure", /* tp_doc */
};
***************
*** 446,451 ****
PyTypeObject PyHH_FTS_QUERYType = {
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyHH_FTS_QUERY", /* tp_name */
sizeof(PyHH_FTS_QUERY), /* tp_basicsize */
--- 445,449 ----
PyTypeObject PyHH_FTS_QUERYType = {
! PYWIN_OBJECT_HEAD
"PyHH_FTS_QUERY", /* tp_name */
sizeof(PyHH_FTS_QUERY), /* tp_basicsize */
***************
*** 467,471 ****
0, /* tp_as_buffer */
0, /* tp_flags */
! 0, /* tp_doc */
};
--- 465,469 ----
0, /* tp_as_buffer */
0, /* tp_flags */
! "A Python object, representing an HH_FTS_QUERY struct", /* tp_doc */
};
***************
*** 534,551 ****
Py_XDECREF(m_pszSearchQuery);
}
!
PyObject *PyHH_FTS_QUERY::getattr(PyObject *self, char *name)
{
PyHH_FTS_QUERY *pO = (PyHH_FTS_QUERY *)self;
!
if (strcmp("searchQuery", name)==0) {
PyObject *rc = pO->m_pszSearchQuery ? pO->m_pszSearchQuery : Py_None;
Py_INCREF(rc);
return rc;
! }
return PyMember_Get((char *)self, memberlist, name);
}
!
int PyHH_FTS_QUERY::setattr(PyObject *self, char *name, PyObject *v)
{
--- 532,549 ----
Py_XDECREF(m_pszSearchQuery);
}
!
PyObject *PyHH_FTS_QUERY::getattr(PyObject *self, char *name)
{
PyHH_FTS_QUERY *pO = (PyHH_FTS_QUERY *)self;
!
if (strcmp("searchQuery", name)==0) {
PyObject *rc = pO->m_pszSearchQuery ? pO->m_pszSearchQuery : Py_None;
Py_INCREF(rc);
return rc;
! }
return PyMember_Get((char *)self, memberlist, name);
}
!
int PyHH_FTS_QUERY::setattr(PyObject *self, char *name, PyObject *v)
{
***************
*** 590,594 ****
return TRUE;
}
!
PyObject *PyWinObject_FromHH_FTS_QUERY(const HH_FTS_QUERY *pFTS_QUERY)
{
--- 588,592 ----
return TRUE;
}
!
PyObject *PyWinObject_FromHH_FTS_QUERY(const HH_FTS_QUERY *pFTS_QUERY)
{
***************
*** 663,668 ****
PyTypeObject PyHH_POPUPType = {
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyHH_POPUP", /* tp_name */
sizeof(PyHH_POPUP), /* tp_basicsize */
--- 661,665 ----
PyTypeObject PyHH_POPUPType = {
! PYWIN_OBJECT_HEAD
"PyHH_POPUP", /* tp_name */
sizeof(PyHH_POPUP), /* tp_basicsize */
***************
*** 684,688 ****
0, /* tp_as_buffer */
0, /* tp_flags */
! 0, /* tp_doc */
};
--- 681,685 ----
0, /* tp_as_buffer */
0, /* tp_flags */
! "A Python object, representing an HH_POPUP structure", /* tp_doc */
};
***************
*** 791,799 ****
Py_XDECREF(m_pszFont);
}
!
PyObject *PyHH_POPUP::getattr(PyObject *self, char *name)
{
PyHH_POPUP *pO = (PyHH_POPUP *)self;
!
if (strcmp("text", name)==0) {
PyObject *rc = pO->m_pszText ? pO->m_pszText : Py_None;
--- 788,796 ----
Py_XDECREF(m_pszFont);
}
!
PyObject *PyHH_POPUP::getattr(PyObject *self, char *name)
{
PyHH_POPUP *pO = (PyHH_POPUP *)self;
!
if (strcmp("text", name)==0) {
PyObject *rc = pO->m_pszText ? pO->m_pszText : Py_None;
***************
*** 819,823 ****
return PyMember_Get((char *)self, memberlist, name);
}
!
int PyHH_POPUP::setattr(PyObject *self, char *name, PyObject *v)
{
--- 816,820 ----
return PyMember_Get((char *)self, memberlist, name);
}
!
int PyHH_POPUP::setattr(PyObject *self, char *name, PyObject *v)
{
***************
*** 827,831 ****
return -1;
}
-
PyHH_POPUP *pO = (PyHH_POPUP *)self;
--- 824,827 ----
***************
*** 877,881 ****
return PyMember_Set((char *)self, memberlist, name, v);
}
!
/*static*/ void PyHH_POPUP::deallocFunc(PyObject *ob)
{
--- 873,877 ----
return PyMember_Set((char *)self, memberlist, name, v);
}
!
/*static*/ void PyHH_POPUP::deallocFunc(PyObject *ob)
{
***************
*** 969,975 ****
//<c HH_GET_WIN_TYPE><nl>
! PyTypeObject PyHH_WINTYPEType = {
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyHH_WINTYPE", /* tp_name */
sizeof(PyHH_WINTYPE), /* tp_basicsize */
--- 965,970 ----
//<c HH_GET_WIN_TYPE><nl>
! PyTypeObject PyHH_WINTYPEType = {
! PYWIN_OBJECT_HEAD
"PyHH_WINTYPE", /* tp_name */
sizeof(PyHH_WINTYPE), /* tp_basicsize */
***************
*** 991,995 ****
0, /* tp_as_buffer */
0, /* tp_flags */
! 0, /* tp_doc */
};
--- 986,990 ----
0, /* tp_as_buffer */
0, /* tp_flags */
! "A Python object, representing an HH_WINTYPE structure", /* tp_doc */
};
***************
*** 1249,1253 ****
return -1;
}
-
PyHH_WINTYPE *pO = (PyHH_WINTYPE *)self;
--- 1244,1247 ----
***************
*** 1445,1450 ****
PyTypeObject PyNMHDRType = {
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyNMHDR", /* tp_name */
sizeof(PyNMHDR), /* tp_basicsize */
--- 1439,1443 ----
PyTypeObject PyNMHDRType = {
! PYWIN_OBJECT_HEAD
"PyNMHDR", /* tp_name */
sizeof(PyNMHDR), /* tp_basicsize */
***************
*** 1466,1470 ****
0, /* tp_as_buffer */
0, /* tp_flags */
! 0, /* tp_doc */
};
--- 1459,1463 ----
0, /* tp_as_buffer */
0, /* tp_flags */
! "A Python object, representing an NMHDR structure", /* tp_doc */
};
***************
*** 1620,1625 ****
PyTypeObject PyHHN_NOTIFYType = {
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyHHN_NOTIFY", /* tp_name */
sizeof(PyHHN_NOTIFY), /* tp_basicsize */
--- 1613,1617 ----
PyTypeObject PyHHN_NOTIFYType = {
! PYWIN_OBJECT_HEAD
"PyHHN_NOTIFY", /* tp_name */
sizeof(PyHHN_NOTIFY), /* tp_basicsize */
***************
*** 1641,1645 ****
0, /* tp_as_buffer */
0, /* tp_flags */
! 0, /* tp_doc */
};
--- 1633,1637 ----
0, /* tp_as_buffer */
0, /* tp_flags */
! "A Python object, representing an HHN_NOTIFY structure", /* tp_doc */
};
***************
*** 1721,1725 ****
return -1;
}
-
PyHHN_NOTIFY *pO = (PyHHN_NOTIFY *)self;
--- 1713,1716 ----
***************
*** 1835,1840 ****
PyTypeObject PyHHNTRACKType = {
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyHHNTRACK", /* tp_name */
sizeof(PyHHNTRACK), /* tp_basicsize */
--- 1826,1830 ----
PyTypeObject PyHHNTRACKType = {
! PYWIN_OBJECT_HEAD
"PyHHNTRACK", /* tp_name */
sizeof(PyHHNTRACK), /* tp_basicsize */
***************
*** 1856,1860 ****
0, /* tp_as_buffer */
0, /* tp_flags */
! 0, /* tp_doc */
};
--- 1846,1850 ----
0, /* tp_as_buffer */
0, /* tp_flags */
! "A Python object, representing an HHNTRACK structure.", /* tp_doc */
};
***************
*** 1928,1932 ****
{
PyHHNTRACK *pO = (PyHHNTRACK *)self;
-
if (strcmp("hdr", name)==0) {
PyObject *rc = pO->m_hdr ? pO->m_hdr : Py_None;
--- 1918,1921 ----
***************
*** 1955,1959 ****
return -1;
}
-
PyHHNTRACK *pO = (PyHHNTRACK *)self;
--- 1944,1947 ----
Index: win2krasmodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win2krasmodule.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** win2krasmodule.cpp 13 Nov 2008 11:11:58 -0000 1.7
--- win2krasmodule.cpp 3 Dec 2008 22:34:21 -0000 1.8
***************
*** 74,97 ****
PyTypeObject PyRASEAPUSERIDENTITY::type =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyRASEAPUSERIDENTITY",
sizeof(PyRASEAPUSERIDENTITY),
0,
PyRASEAPUSERIDENTITY::deallocFunc, /* tp_dealloc */
! 0, /* tp_print */
PyRASEAPUSERIDENTITY::getattr, /* tp_getattr */
! 0, /* tp_setattr */
! 0, /* tp_compare */
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
! 0,
0, /* tp_call */
! 0, /* tp_str */
0, /*tp_getattro*/
! 0, /*tp_setattro*/
! 0, /*tp_as_buffer*/
};
--- 74,96 ----
PyTypeObject PyRASEAPUSERIDENTITY::type =
{
! PYWIN_OBJECT_HEAD
"PyRASEAPUSERIDENTITY",
sizeof(PyRASEAPUSERIDENTITY),
0,
PyRASEAPUSERIDENTITY::deallocFunc, /* tp_dealloc */
! 0, /* tp_print */
PyRASEAPUSERIDENTITY::getattr, /* tp_getattr */
! 0, /* tp_setattr */
! 0, /* tp_compare */
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
! 0, /* tp_hash */
0, /* tp_call */
! 0, /* tp_str */
0, /*tp_getattro*/
! 0, /*tp_setattro*/
! 0, /*tp_as_buffer*/
};
Index: odbc.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/odbc.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** odbc.cpp 21 Oct 2008 11:08:28 -0000 1.26
--- odbc.cpp 3 Dec 2008 22:34:21 -0000 1.27
***************
*** 111,116 ****
static PyTypeObject Cursor_Type =
{
! PyObject_HEAD_INIT (&PyType_Type)
! 0, /*ob_size */
"odbccur", /*tp_name */
sizeof(cursorObject), /*tp_basicsize */
--- 111,115 ----
static PyTypeObject Cursor_Type =
{
! PYWIN_OBJECT_HEAD
"odbccur", /*tp_name */
sizeof(cursorObject), /*tp_basicsize */
***************
*** 158,163 ****
static PyTypeObject Connection_Type =
{
! PyObject_HEAD_INIT (&PyType_Type)
! 0, /*ob_size */
"odbcconn", /*tp_name */
sizeof (connectionObject), /*tp_basicsize */
--- 157,161 ----
static PyTypeObject Connection_Type =
{
! PYWIN_OBJECT_HEAD
"odbcconn", /*tp_name */
sizeof (connectionObject), /*tp_basicsize */
Index: PyWAVEFORMATEX.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWAVEFORMATEX.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PyWAVEFORMATEX.cpp 1 Dec 2004 23:13:57 -0000 1.2
--- PyWAVEFORMATEX.cpp 3 Dec 2008 22:34:21 -0000 1.3
***************
*** 43,48 ****
PYWINTYPES_EXPORT PyTypeObject PyWAVEFORMATEXType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyWAVEFORMATEX",
sizeof(PyWAVEFORMATEX),
--- 43,47 ----
PYWINTYPES_EXPORT PyTypeObject PyWAVEFORMATEXType =
{
! PYWIN_OBJECT_HEAD
"PyWAVEFORMATEX",
sizeof(PyWAVEFORMATEX),
Index: PyHANDLE.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PyHANDLE.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** PyHANDLE.cpp 3 Jun 2007 14:53:07 -0000 1.16
--- PyHANDLE.cpp 3 Dec 2008 22:34:21 -0000 1.17
***************
*** 139,144 ****
PYWINTYPES_EXPORT PyTypeObject PyHANDLEType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyHANDLE",
sizeof(PyHANDLE),
--- 139,143 ----
PYWINTYPES_EXPORT PyTypeObject PyHANDLEType =
{
! PYWIN_OBJECT_HEAD
"PyHANDLE",
sizeof(PyHANDLE),
***************
*** 150,163 ****
0, // PyHANDLE::setattr, /* tp_setattr */
// @pymeth __cmp__|Used when HANDLE objects are compared.
! PyHANDLE::compareFunc, /* tp_compare */
! PyHANDLE::strFunc, /* tp_repr */
&PyHANDLE_NumberMethods, /* tp_as_number */
! 0, /* tp_as_sequence */
! 0, /* tp_as_mapping */
// @pymeth __hash__|Used when the hash value of an object is required
! PyHANDLE::hashFunc, /* tp_hash */
! 0, /* tp_call */
// @pymeth __str__|Used when a string representation is required
! PyHANDLE::strFunc, /* tp_str */
};
--- 149,162 ----
0, // PyHANDLE::setattr, /* tp_setattr */
// @pymeth __cmp__|Used when HANDLE objects are compared.
! PyHANDLE::compareFunc, /* tp_compare */
! PyHANDLE::strFunc, /* tp_repr */
&PyHANDLE_NumberMethods, /* tp_as_number */
! 0, /* tp_as_sequence */
! 0, /* tp_as_mapping */
// @pymeth __hash__|Used when the hash value of an object is required
! PyHANDLE::hashFunc, /* tp_hash */
! 0, /* tp_call */
// @pymeth __str__|Used when a string representation is required
! PyHANDLE::strFunc, /* tp_str */
};
***************
*** 309,315 ****
PyObject * PyHANDLE::asStr(void)
{
! TCHAR resBuf[160];
! wsprintf(resBuf, _T("<%s:%Id>"), GetTypeName(), m_handle);
! return PyString_FromTCHAR(resBuf);
}
--- 308,314 ----
PyObject * PyHANDLE::asStr(void)
{
! WCHAR resBuf[160];
! _snwprintf(resBuf, 160, L"<%hs:%Id>", GetTypeName(), m_handle);
! return PyWinCoreString_FromString(resBuf);
}
Index: PyACL.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PyACL.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** PyACL.cpp 23 Jul 2007 05:16:05 -0000 1.17
--- PyACL.cpp 3 Dec 2008 22:34:21 -0000 1.18
***************
*** 1134,1154 ****
PYWINTYPES_EXPORT PyTypeObject PyACLType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyACL",
sizeof(PyACL),
0,
PyACL::deallocFunc, /* tp_dealloc */
! 0, /* tp_print */
PyACL::getattr, /* tp_getattr */
! 0, /* tp_setattr */
! 0,
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
! 0,
0, /* tp_call */
! 0, /* tp_str */
};
--- 1134,1153 ----
PYWINTYPES_EXPORT PyTypeObject PyACLType =
{
! PYWIN_OBJECT_HEAD
"PyACL",
sizeof(PyACL),
0,
PyACL::deallocFunc, /* tp_dealloc */
! 0, /* tp_print */
PyACL::getattr, /* tp_getattr */
! 0, /* tp_setattr */
! 0, /* tp_compare */
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
! 0, /* tp_hash */
0, /* tp_call */
! 0, /* tp_str */
};
Index: mmapfilemodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/mmapfilemodule.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** mmapfilemodule.cpp 13 Nov 2008 11:11:58 -0000 1.5
--- mmapfilemodule.cpp 3 Dec 2008 22:34:21 -0000 1.6
***************
*** 475,480 ****
static PyTypeObject mmapfile_object_type = {
! PyObject_HEAD_INIT(&PyType_Type)
! 0, // ob_size
"mmapfile", // tp_name
sizeof(mmapfile_object), // tp_size
--- 475,479 ----
static PyTypeObject mmapfile_object_type = {
! PYWIN_OBJECT_HEAD
"mmapfile", // tp_name
sizeof(mmapfile_object), // tp_size
Index: PyIID.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PyIID.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** PyIID.cpp 13 Nov 2008 04:04:51 -0000 1.9
--- PyIID.cpp 3 Dec 2008 22:34:21 -0000 1.10
***************
*** 148,153 ****
PYWINTYPES_EXPORT PyTypeObject PyIIDType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyIID",
sizeof(PyIID),
--- 148,152 ----
PYWINTYPES_EXPORT PyTypeObject PyIIDType =
{
! PYWIN_OBJECT_HEAD
"PyIID",
sizeof(PyIID),
***************
*** 169,176 ****
// @pymeth __str__|Used whenever a string representation of the IID is required.
PyIID::strFunc, /* tp_str */
! 0, /*tp_getattro*/
! 0, /*tp_setattro*/
// @comm Note that IID objects support the buffer interface. Thus buffer(iid) can be used to obtain the raw bytes.
! &PyIID_as_buffer, /*tp_as_buffer*/
};
--- 168,175 ----
// @pymeth __str__|Used whenever a string representation of the IID is required.
PyIID::strFunc, /* tp_str */
! 0, /*tp_getattro*/
! 0, /*tp_setattro*/
// @comm Note that IID objects support the buffer interface. Thus buffer(iid) can be used to obtain the raw bytes.
! &PyIID_as_buffer, /*tp_as_buffer*/
};
Index: win32service.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32service.i,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** win32service.i 13 Nov 2008 11:11:58 -0000 1.18
--- win32service.i 3 Dec 2008 22:34:21 -0000 1.19
***************
*** 121,126 ****
PyTypeObject PyHWINSTAType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyHWINSTA",
sizeof(PyHWINSTA),
--- 121,125 ----
PyTypeObject PyHWINSTAType =
{
! PYWIN_OBJECT_HEAD
"PyHWINSTA",
sizeof(PyHWINSTA),
***************
*** 225,230 ****
PyTypeObject PyHDESKType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyHDESK",
sizeof(PyHDESK),
--- 224,228 ----
PyTypeObject PyHDESKType =
{
! PYWIN_OBJECT_HEAD
"PyHDESK",
sizeof(PyHDESK),
***************
*** 239,243 ****
0, /* tp_as_sequence */
0, /* tp_as_mapping */
! 0,
0, /* tp_call */
0, /* tp_str */
--- 237,241 ----
0, /* tp_as_sequence */
0, /* tp_as_mapping */
! 0, /* tp_hash */
0, /* tp_call */
0, /* tp_str */
Index: win32file_comm.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32file_comm.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** win32file_comm.cpp 13 Nov 2008 11:11:58 -0000 1.6
--- win32file_comm.cpp 3 Dec 2008 22:34:21 -0000 1.7
***************
*** 104,126 ****
PyTypeObject PyDCB::type =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyDCB",
sizeof(PyDCB),
0,
PyDCB::deallocFunc, /* tp_dealloc */
! 0, /* tp_print */
PyDCB::getattr, /* tp_getattr */
PyDCB::setattr, /* tp_setattr */
! 0, /* tp_compare */
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
- 0,
0, /* tp_call */
! 0, /* tp_str */
};
#define OFF(e) offsetof(PyDCB, e)
--- 104,126 ----
PyTypeObject PyDCB::type =
{
! PYWIN_OBJECT_HEAD
"PyDCB",
sizeof(PyDCB),
0,
PyDCB::deallocFunc, /* tp_dealloc */
! 0, /* tp_print */
PyDCB::getattr, /* tp_getattr */
PyDCB::setattr, /* tp_setattr */
! 0, /* tp_compare */
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
0, /* tp_call */
! 0, /* tp_call */
! 0, /* tp_str */
};
+
#define OFF(e) offsetof(PyDCB, e)
***************
*** 314,334 ****
PyTypeObject PyCOMSTAT::type =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyCOMSTAT",
sizeof(PyCOMSTAT),
0,
! PyCOMSTAT::deallocFunc, /* tp_dealloc */
! 0, /* tp_print */
PyCOMSTAT::getattr, /* tp_getattr */
PyCOMSTAT::setattr, /* tp_setattr */
! 0, /* tp_compare */
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
! 0,
0, /* tp_call */
! 0, /* tp_str */
};
--- 314,333 ----
PyTypeObject PyCOMSTAT::type =
{
! PYWIN_OBJECT_HEAD
"PyCOMSTAT",
sizeof(PyCOMSTAT),
0,
! PyCOMSTAT::deallocFunc, /* tp_dealloc */
! 0, /* tp_print */
PyCOMSTAT::getattr, /* tp_getattr */
PyCOMSTAT::setattr, /* tp_setattr */
! 0, /* tp_compare */
0, /* tp_repr */
0, /* tp_as_number */
! 0, /* tp_as_sequence */
0, /* tp_as_mapping */
! 0, /* tp_hash */
0, /* tp_call */
! 0, /* tp_str */
};
Index: PyDEVMODE.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PyDEVMODE.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** PyDEVMODE.cpp 6 Feb 2008 18:37:46 -0000 1.7
--- PyDEVMODE.cpp 3 Dec 2008 22:34:21 -0000 1.8
***************
*** 113,118 ****
PYWINTYPES_EXPORT PyTypeObject PyDEVMODEType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyDEVMODE",
sizeof(PyDEVMODE),
--- 113,117 ----
PYWINTYPES_EXPORT PyTypeObject PyDEVMODEType =
{
! PYWIN_OBJECT_HEAD
"PyDEVMODE",
sizeof(PyDEVMODE),
***************
*** 493,498 ****
PYWINTYPES_EXPORT PyTypeObject PyDEVMODEWType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyDEVMODEW",
sizeof(PyDEVMODEW),
--- 492,496 ----
PYWINTYPES_EXPORT PyTypeObject PyDEVMODEWType =
{
! PYWIN_OBJECT_HEAD
"PyDEVMODEW",
sizeof(PyDEVMODEW),
|