[pywin32-checkins] pywin32/win32/src/win32net win32netmisc.cpp, 1.15, 1.16
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
|
From: Mark H. <mha...@us...> - 2009-02-03 04:28:22
|
Update of /cvsroot/pywin32/pywin32/win32/src/win32net In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18296/win32/src/win32net Modified Files: win32netmisc.cpp Log Message: fix unicode arg handling of NetShareEnum Index: win32netmisc.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32net/win32netmisc.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** win32netmisc.cpp 3 Jan 2009 06:43:59 -0000 1.15 --- win32netmisc.cpp 3 Feb 2009 04:28:18 -0000 1.16 *************** *** 349,362 **** PyNetShareEnum(PyObject *self, PyObject *args) { ! LPSTR szServerName; // @pyparmalt1 string|serverName||The name of the server on which the call should execute, or None for the local computer. // @comm If the old style is used, the result is a list of [(shareName, type, remarks), ...] ! if (PyArg_ParseTuple(args, "z:NetShareEnum",&szServerName)) { ! WCHAR *wServerName = NULL; ! if (szServerName && !PyWin_String_AsWCHAR(szServerName, -1, &wServerName)) return NULL; PyObject *ret = PyNetShareEnum1(wServerName); ! if (wServerName) ! PyWinObject_FreeString(wServerName); return ret; } --- 349,361 ---- PyNetShareEnum(PyObject *self, PyObject *args) { ! PyObject *obServerName; // @pyparmalt1 string|serverName||The name of the server on which the call should execute, or None for the local computer. // @comm If the old style is used, the result is a list of [(shareName, type, remarks), ...] ! if (PyArg_ParseTuple(args, "O:NetShareEnum",&obServerName)) { ! WCHAR *wServerName; ! if (!PyWinObject_AsWCHAR(obServerName, &wServerName, TRUE)) return NULL; PyObject *ret = PyNetShareEnum1(wServerName); ! PyWinObject_FreeWCHAR(wServerName); return ret; } |