diff options
| author | Giampaolo Rodola <g.rodola@gmail.com> | 2017-05-01 07:51:47 +0200 |
|---|---|---|
| committer | Giampaolo Rodola <g.rodola@gmail.com> | 2017-05-01 07:51:47 +0200 |
| commit | d93a437325d9028f717dfbc1344015b86311d24f (patch) | |
| tree | 75bad9c282bdd716715b299e934a744bb5cd5bdd /psutil/arch | |
| parent | 9c22b44dc27607e508036c1cb846b9008c7eb39e (diff) | |
| download | psutil-d93a437325d9028f717dfbc1344015b86311d24f.tar.gz | |
#1040 fix unicode for memory_maps() on osx
Diffstat (limited to 'psutil/arch')
| -rw-r--r-- | psutil/arch/osx/process_info.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/psutil/arch/osx/process_info.c b/psutil/arch/osx/process_info.c index 1c97b69f..28b02246 100644 --- a/psutil/arch/osx/process_info.c +++ b/psutil/arch/osx/process_info.c @@ -177,12 +177,8 @@ psutil_get_cmdline(long pid) { goto error; while (arg_ptr < arg_end && nargs > 0) { if (*arg_ptr++ == '\0') { -#if PY_MAJOR_VERSION >= 3 - py_arg = PyUnicode_DecodeFSDefault(curr_arg); -#else - py_arg = Py_BuildValue("s", curr_arg); -#endif - if (!py_arg) + py_arg = psutil_PyUnicode_DecodeFSDefault(curr_arg); + if (! py_arg) goto error; if (PyList_Append(py_retlist, py_arg)) goto error; |
