[pywin32-checkins] pywin32/win32/src PythonService.cpp,1.19,1.20
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2006-01-10 00:03:05
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19880 Modified Files: PythonService.cpp Log Message: Allow the "Debugging" method to optionally set the service debug flag. Index: PythonService.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PythonService.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** PythonService.cpp 20 Sep 2005 12:45:07 -0000 1.19 --- PythonService.cpp 10 Jan 2006 00:02:57 -0000 1.20 *************** *** 382,392 **** } ! // @pymethod True/False|servicemanager|Debugging|Indicates if the service is running in debug mode. static PyObject *PyDebugging(PyObject *self, PyObject *args) { ! if (!PyArg_ParseTuple(args, ":Debugging")) return NULL; PyObject *rc = bServiceDebug ? Py_True : Py_False; Py_INCREF(rc); return rc; } --- 382,398 ---- } ! // @pymethod True/False|servicemanager|Debugging|Indicates if the service is running in debug mode ! // and optionally toggles the debug flag. static PyObject *PyDebugging(PyObject *self, PyObject *args) { ! // @pyparm int|newVal|-1|If not -1, a new value for the debugging flag. ! // The result is the value of the flag before it is changed. ! int newVal = (int)-1; ! if (!PyArg_ParseTuple(args, "|i:Debugging", &newVal)) return NULL; PyObject *rc = bServiceDebug ? Py_True : Py_False; Py_INCREF(rc); + if (newVal != (int)-1) + bServiceDebug = newVal; return rc; } *************** *** 442,445 **** --- 448,453 ---- PyObject *nameOb = Py_None, *fileOb = Py_None; // @pyparm <o PyUnicode>|eventSourceName|None|The event source name + // @pyparm <o PyUnicode>|eventSourceFile|None|The name of the file + // (generally a DLL) with the event source messages. if (!PyArg_ParseTuple(args, "|OO", &nameOb, &fileOb)) return NULL; |