mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 09:57:43 +03:00 
			
		
		
		
	Merge pull request #2033 from matthew-brett/fix-iso-c90-tk-error
FIX: fix C90 compilation error for Tcl / Tk stuff
This commit is contained in:
		
						commit
						370d3f8c13
					
				| 
						 | 
				
			
			@ -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;
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user