finch/libgnt/gntwm.c

branch
release-2.x.y
changeset 35561
c8bb4edd6325
parent 33797
abc9e0edacc9
child 35563
922e7abddb4d
--- a/finch/libgnt/gntwm.c	Thu Feb 13 18:01:36 2014 +0100
+++ b/finch/libgnt/gntwm.c	Thu Feb 13 20:16:25 2014 -0500
@@ -1281,7 +1281,12 @@
 {
 	char *dir = g_path_get_dirname(path);
 	FILE *file = fopen(path, "r");
-	PyObject *pp = PySys_GetObject("path"), *dirobj = PyString_FromString(dir);
+	PyObject *pp = PySys_GetObject("path");
+#if PY_MAJOR_VERSION >= 3
+	PyObject *dirobj = PyUnicode_FromString(dir);
+#else
+	PyObject *dirobj = PyString_FromString(dir);
+#endif
 
 	PyList_Insert(pp, 0, dirobj);
 	Py_DECREF(dirobj);

mercurial