summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2020-12-21 14:33:33 -0800
committerGiampaolo Rodola <g.rodola@gmail.com>2020-12-21 14:33:33 -0800
commit88a017345616cacf718c76980821d26b448f730a (patch)
tree10b383f90f7b10bbb2de7b083c0335f504a6d6d0
parent03211cf6b1ec529c8e6cb4b528658547a01d645b (diff)
downloadpsutil-88a017345616cacf718c76980821d26b448f730a.tar.gz
rename C fun
-rw-r--r--psutil/_psutil_windows.c2
-rw-r--r--psutil/_pswindows.py2
-rw-r--r--psutil/arch/windows/disk.c2
-rw-r--r--psutil/arch/windows/disk.h2
4 files changed, 4 insertions, 4 deletions
diff --git a/psutil/_psutil_windows.c b/psutil/_psutil_windows.c
index 93a659bf..7a3ab329 100644
--- a/psutil/_psutil_windows.c
+++ b/psutil/_psutil_windows.c
@@ -1666,7 +1666,7 @@ PsutilMethods[] = {
"Stop a service"},
// --- windows API bindings
- {"win32_QueryDosDevice", psutil_win32_QueryDosDevice, METH_VARARGS,
+ {"QueryDosDevice", psutil_QueryDosDevice, METH_VARARGS,
"QueryDosDevice binding"},
// --- others
diff --git a/psutil/_pswindows.py b/psutil/_pswindows.py
index 138bc83d..0ad60c4a 100644
--- a/psutil/_pswindows.py
+++ b/psutil/_pswindows.py
@@ -197,7 +197,7 @@ def convert_dos_path(s):
"C:\Windows\systemew\file.txt"
"""
rawdrive = '\\'.join(s.split('\\')[:3])
- driveletter = cext.win32_QueryDosDevice(rawdrive)
+ driveletter = cext.QueryDosDevice(rawdrive)
remainder = s[len(rawdrive):]
return os.path.join(driveletter, remainder)
diff --git a/psutil/arch/windows/disk.c b/psutil/arch/windows/disk.c
index 92171fe5..29bd0a20 100644
--- a/psutil/arch/windows/disk.c
+++ b/psutil/arch/windows/disk.c
@@ -364,7 +364,7 @@ error:
If no match is found return an empty string.
*/
PyObject *
-psutil_win32_QueryDosDevice(PyObject *self, PyObject *args) {
+psutil_QueryDosDevice(PyObject *self, PyObject *args) {
LPCTSTR lpDevicePath;
TCHAR d = TEXT('A');
TCHAR szBuff[5];
diff --git a/psutil/arch/windows/disk.h b/psutil/arch/windows/disk.h
index 298fb6ba..28bed22b 100644
--- a/psutil/arch/windows/disk.h
+++ b/psutil/arch/windows/disk.h
@@ -9,4 +9,4 @@
PyObject *psutil_disk_io_counters(PyObject *self, PyObject *args);
PyObject *psutil_disk_partitions(PyObject *self, PyObject *args);
PyObject *psutil_disk_usage(PyObject *self, PyObject *args);
-PyObject *psutil_win32_QueryDosDevice(PyObject *self, PyObject *args);
+PyObject *psutil_QueryDosDevice(PyObject *self, PyObject *args);