Skip to content

Commit

Permalink
Merge f3565f3 into 37841db
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-brett committed Jul 17, 2016
2 parents 37841db + f3565f3 commit 89fd07c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Tk/tkImaging.c
Expand Up @@ -371,7 +371,8 @@ int load_tkinter_funcs(void)
#if PY_VERSION_HEX >= 0x03000000
char *fname2char(PyObject *fname)
{
PyObject *bytes = PyUnicode_EncodeFSDefault(fname);
PyObject* bytes;
bytes = PyUnicode_EncodeFSDefault(fname);
if (bytes == NULL) {
return NULL;
}
Expand All @@ -391,9 +392,10 @@ void *_dfunc(void *lib_handle, const char *func_name)
* Returns function pointer or NULL if not present.
*/

void* func;
/* Reset errors. */
dlerror();
void *func = dlsym(lib_handle, func_name);
func = dlsym(lib_handle, func_name);
if (func == NULL) {
const char *error = dlerror();
PyErr_SetString(PyExc_RuntimeError, error);
Expand Down

0 comments on commit 89fd07c

Please sign in to comment.