[pywin32-checkins] pywin32/com/win32comext/axdebug/src AXDebug.cpp, 1.4, 1.5
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-11-13 11:12:06
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axdebug/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9817/com/win32comext/axdebug/src Modified Files: AXDebug.cpp Log Message: Yet more TCHAR/64bit and other misc changes from py3k branch. Index: AXDebug.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axdebug/src/AXDebug.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AXDebug.cpp 10 Mar 2003 01:01:40 -0000 1.4 --- AXDebug.cpp 13 Nov 2008 11:11:58 -0000 1.5 *************** *** 207,211 **** } /* List of module functions */ ! // @module axdebug|A module, encapsulating the ActiveX Debugging static struct PyMethodDef axdebug_methods[]= { --- 207,211 ---- } /* List of module functions */ ! // @module axdebug|A module, encapsulating the ActiveX Debugging interfaces static struct PyMethodDef axdebug_methods[]= { *************** *** 216,232 **** }; - static int AddConstant(PyObject *dict, const char *key, long value) - { - PyObject *oval = PyInt_FromLong(value); - if (!oval) - { - return 1; - } - int rc = PyDict_SetItemString(dict, (char*)key, oval); - Py_DECREF(oval); - return rc; - } - - #define ADD_CONSTANT(tok) AddConstant(dict, #tok, tok) // The list of interfaces and gateways we support. --- 216,219 ---- *************** *** 293,296 **** --- 280,284 ---- }; + #define ADD_CONSTANT(tok) if (PyModule_AddIntConstant(module, #tok, tok) == -1) RETURN_ERROR; /* Module initialisation */ *************** *** 308,318 **** if (!dict) return; /* Another serious error!*/ ! // Add some symbolic constants to the module ! axdebug_Error = PyString_FromString("error"); if (axdebug_Error == NULL || PyDict_SetItemString(dict, "error", axdebug_Error) != 0) ! { ! PyErr_SetString(PyExc_MemoryError, "can't define error"); ! return; ! } // AX-Debugging interface registration --- 296,303 ---- if (!dict) return; /* Another serious error!*/ ! // Add some symbolic constants to the module ! axdebug_Error = PyErr_NewException("axdebug.error", NULL, NULL); if (axdebug_Error == NULL || PyDict_SetItemString(dict, "error", axdebug_Error) != 0) ! RETURN_ERROR; // AX-Debugging interface registration *************** *** 400,405 **** ADD_CONSTANT(TEXT_DOC_ATTR_READONLY); // @const axdebug|TEXT_DOC_ATTR_READONLY|Indicates that the document is read-only. - - // ADD_CONSTANT(); - } --- 385,387 ---- |