File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ void main_thread_handler(gpointer user_data)
135135 int ii = 0 ;
136136 for (ii = 0 ; ii < PyList_Size (syspath ); ++ ii )
137137 {
138- #if PY_MAJOR_VERSION > 2
138+ #if PY_MAJOR_VERSION >= 3
139139 Py_ssize_t wlen ;
140140 wchar_t * wstr = PyUnicode_AsWideCharString (PyList_GetItem (syspath , ii ), & wlen );
141141 char * pydir = (char * )malloc (wlen + 1 );
@@ -150,7 +150,7 @@ void main_thread_handler(gpointer user_data)
150150 strncpy (curdir , strlen (pydir ) > 0 ? pydir : "." , 1024 );
151151 strncat (curdir , slash , 1024 );
152152
153- #if PY_MAJOR_VERSION > 2
153+ #if PY_MAJOR_VERSION >= 3
154154 free (pydir );
155155#endif
156156
Original file line number Diff line number Diff line change 11using System ;
22using System . Runtime . InteropServices ;
33using System . Security ;
4- #if UCS4
54using System . Text ;
5+
6+ #if UCS4
67using Mono . Unix ;
7- #elif UCS2 && PYTHON3
8- using System . Text ;
98#endif
109
1110namespace Python . Runtime
You can’t perform that action at this time.
0 commit comments