Update of /cvsroot/pywin32/pywin32/com/win32comext/directsound/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11723
Modified Files:
Tag: py3k
PyDSBCAPS.cpp PyDSBUFFERDESC.cpp PyDSCAPS.cpp PyDSCBCAPS.cpp
PyDSCBUFFERDESC.cpp PyDSCCAPS.cpp directsound.cpp
Log Message:
Changes to build for Py3k
Index: PyDSBUFFERDESC.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/directsound/src/PyDSBUFFERDESC.cpp,v
retrieving revision 1.3
retrieving revision 1.3.4.1
diff -C2 -d -r1.3 -r1.3.4.1
*** PyDSBUFFERDESC.cpp 25 Mar 2005 01:52:11 -0000 1.3
--- PyDSBUFFERDESC.cpp 29 Aug 2008 08:32:34 -0000 1.3.4.1
***************
*** 48,53 ****
PyTypeObject PyDSBUFFERDESCType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyDSBUFFERDESC",
sizeof(PyDSBUFFERDESC),
--- 48,52 ----
PyTypeObject PyDSBUFFERDESCType =
{
! PYWIN_OBJECT_HEAD
"PyDSBUFFERDESC",
sizeof(PyDSBUFFERDESC),
Index: PyDSCCAPS.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/directsound/src/PyDSCCAPS.cpp,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -C2 -d -r1.2 -r1.2.4.1
*** PyDSCCAPS.cpp 25 Mar 2005 01:52:11 -0000 1.2
--- PyDSCCAPS.cpp 29 Aug 2008 08:32:34 -0000 1.2.4.1
***************
*** 43,48 ****
PyTypeObject PyDSCCAPSType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyDSCCAPSType",
sizeof(PyDSCCAPSType),
--- 43,47 ----
PyTypeObject PyDSCCAPSType =
{
! PYWIN_OBJECT_HEAD
"PyDSCCAPSType",
sizeof(PyDSCCAPSType),
Index: PyDSCAPS.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/directsound/src/PyDSCAPS.cpp,v
retrieving revision 1.3
retrieving revision 1.3.4.1
diff -C2 -d -r1.3 -r1.3.4.1
*** PyDSCAPS.cpp 25 Mar 2005 01:52:11 -0000 1.3
--- PyDSCAPS.cpp 29 Aug 2008 08:32:34 -0000 1.3.4.1
***************
*** 43,48 ****
PyTypeObject PyDSCAPSType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyDSCAPSType",
sizeof(PyDSCAPSType),
--- 43,47 ----
PyTypeObject PyDSCAPSType =
{
! PYWIN_OBJECT_HEAD
"PyDSCAPSType",
sizeof(PyDSCAPSType),
Index: directsound.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/directsound/src/directsound.cpp,v
retrieving revision 1.8
retrieving revision 1.8.4.1
diff -C2 -d -r1.8 -r1.8.4.1
*** directsound.cpp 25 Mar 2005 01:52:11 -0000 1.8
--- directsound.cpp 29 Aug 2008 08:32:34 -0000 1.8.4.1
***************
*** 261,274 ****
/* Module initialisation */
! extern "C" __declspec(dllexport) void initdirectsound()
{
! char *modName = "directsound";
! PyObject *oModule;
! // Create the module and add the functions
! oModule = Py_InitModule(modName, directsound_methods);
! if (!oModule) /* Eeek - some serious error! */
return;
! PyObject *dict = PyModule_GetDict(oModule);
! if (!dict) return; /* Another serious error!*/
// Register all of our interfaces, gateways and IIDs.
--- 261,297 ----
/* Module initialisation */
! extern "C" __declspec(dllexport)
! #if (PY_VERSION_HEX < 0x03000000)
! void initdirectsound(void)
! #else
! PyObject *PyInit_directsound(void)
! #endif
{
! PyObject *dict, *module;
! PyWinGlobals_Ensure();
!
! #if (PY_VERSION_HEX < 0x03000000)
! module = Py_InitModule("directsound", directsound_methods);
! if (!module)
return;
! dict = PyModule_GetDict(module);
! if (!dict)
! return;
! #else
!
! static PyModuleDef directsound_def = {
! PyModuleDef_HEAD_INIT,
! "directsound",
! "A module encapsulating the DirectSound interfaces.",
! -1,
! directsound_methods
! };
! module = PyModule_Create(&directsound_def);
! if (!module)
! return NULL;
! dict = PyModule_GetDict(module);
! if (!dict)
! return NULL;
! #endif
// Register all of our interfaces, gateways and IIDs.
***************
*** 401,404 ****
--- 424,431 ----
PyDict_SetItemString(dict, "DSCBCAPSType", (PyObject *)&PyDSCBCAPSType);
PyDict_SetItemString(dict, "DSCBUFFERDESCType", (PyObject *)&PyDSCBUFFERDESCType);
+
+ #if (PY_VERSION_HEX >= 0x03000000)
+ return module;
+ #endif
}
Index: PyDSBCAPS.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/directsound/src/PyDSBCAPS.cpp,v
retrieving revision 1.3
retrieving revision 1.3.4.1
diff -C2 -d -r1.3 -r1.3.4.1
*** PyDSBCAPS.cpp 25 Mar 2005 01:52:11 -0000 1.3
--- PyDSBCAPS.cpp 29 Aug 2008 08:32:34 -0000 1.3.4.1
***************
*** 43,48 ****
PyTypeObject PyDSBCAPSType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyDSBCAPS",
sizeof(PyDSBCAPS),
--- 43,47 ----
PyTypeObject PyDSBCAPSType =
{
! PYWIN_OBJECT_HEAD
"PyDSBCAPS",
sizeof(PyDSBCAPS),
Index: PyDSCBCAPS.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/directsound/src/PyDSCBCAPS.cpp,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -C2 -d -r1.2 -r1.2.4.1
*** PyDSCBCAPS.cpp 25 Mar 2005 01:52:11 -0000 1.2
--- PyDSCBCAPS.cpp 29 Aug 2008 08:32:34 -0000 1.2.4.1
***************
*** 43,48 ****
PyTypeObject PyDSCBCAPSType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyDSCBCAPSType",
sizeof(PyDSCBCAPSType),
--- 43,47 ----
PyTypeObject PyDSCBCAPSType =
{
! PYWIN_OBJECT_HEAD
"PyDSCBCAPSType",
sizeof(PyDSCBCAPSType),
Index: PyDSCBUFFERDESC.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/directsound/src/PyDSCBUFFERDESC.cpp,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -C2 -d -r1.2 -r1.2.4.1
*** PyDSCBUFFERDESC.cpp 25 Mar 2005 01:52:11 -0000 1.2
--- PyDSCBUFFERDESC.cpp 29 Aug 2008 08:32:34 -0000 1.2.4.1
***************
*** 48,53 ****
PyTypeObject PyDSCBUFFERDESCType =
{
! PyObject_HEAD_INIT(&PyType_Type)
! 0,
"PyDSCBUFFERDESC",
sizeof(PyDSCBUFFERDESC),
--- 48,52 ----
PyTypeObject PyDSCBUFFERDESCType =
{
! PYWIN_OBJECT_HEAD
"PyDSCBUFFERDESC",
sizeof(PyDSCBUFFERDESC),
|