File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -351,7 +351,8 @@ int load_tkinter_funcs(void)
351351// From module __file__ attribute to char *string for dlopen.
352352char *fname2char (PyObject *fname)
353353{
354- PyObject *bytes = PyUnicode_EncodeFSDefault (fname);
354+ PyObject* bytes;
355+ bytes = PyUnicode_EncodeFSDefault (fname);
355356 if (bytes == NULL ) {
356357 return NULL ;
357358 }
@@ -372,9 +373,10 @@ void *_dfunc(void *lib_handle, const char *func_name)
372373 // Set Python exception if we can't find `func_name` in `lib_handle`.
373374 // Returns function pointer or NULL if not present.
374375
376+ void * func;
375377 // Reset errors.
376378 dlerror ();
377- void * func = dlsym (lib_handle, func_name);
379+ func = dlsym (lib_handle, func_name);
378380 if (func == NULL ) {
379381 const char *error = dlerror ();
380382 PyErr_SetString (PyExc_RuntimeError, error);
You can’t perform that action at this time.
0 commit comments