projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8df545a
)
This should have been in the last commit.
author
Sven Trenkel
<collectd@semidefinite.de>
Sun, 6 Dec 2009 18:10:19 +0000
(19:10 +0100)
committer
Sven Trenkel
<collectd@semidefinite.de>
Sun, 6 Dec 2009 18:10:19 +0000
(19:10 +0100)
src/python.c
patch
|
blob
|
history
diff --git
a/src/python.c
b/src/python.c
index
08abfd1
..
434d931
100644
(file)
--- a/
src/python.c
+++ b/
src/python.c
@@
-600,7
+600,13
@@
static PyObject *cpy_unregister_generic(cpy_callback_t **list_head, PyObject *ar
const char *name;
cpy_callback_t *prev = NULL, *tmp;
- if (PyString_Check(arg)) {
+ if (PyUnicode_Check(arg)) {
+ arg = PyUnicode_AsEncodedString(arg, NULL, NULL);
+ if (arg == NULL)
+ return NULL;
+ name = PyString_AsString(arg);
+ Py_DECREF(arg);
+ } else if (PyString_Check(arg)) {
name = PyString_AsString(arg);
} else {
if (!PyCallable_Check(arg)) {