Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r87771:62e8ed13b033
Date: 2016-10-14 10:33 +0200
http://bitbucket.org/pypy/pypy/changeset/62e8ed13b033/

Log:    Issue #2416: Fixes for the UserWarning: implicit cast from 'char *'
        to 'FOO *' will be forbidden in the future

diff --git a/lib_pypy/_tkinter/tclobj.py b/lib_pypy/_tkinter/tclobj.py
--- a/lib_pypy/_tkinter/tclobj.py
+++ b/lib_pypy/_tkinter/tclobj.py
@@ -171,7 +171,7 @@
         encoded = value.encode('utf-16')[2:]
         buf = tkffi.new("char[]", encoded)
         inbuf = tkffi.cast("Tcl_UniChar*", buf)
-        return tklib.Tcl_NewUnicodeObj(buf, len(encoded)/2)
+        return tklib.Tcl_NewUnicodeObj(inbuf, len(encoded)/2)
     if isinstance(value, TclObject):
         tklib.Tcl_IncrRefCount(value._value)
         return value._value
diff --git a/lib_pypy/_tkinter/tklib_build.py b/lib_pypy/_tkinter/tklib_build.py
--- a/lib_pypy/_tkinter/tklib_build.py
+++ b/lib_pypy/_tkinter/tklib_build.py
@@ -107,7 +107,7 @@
 int Tcl_Init(Tcl_Interp* interp);
 int Tk_Init(Tcl_Interp* interp);
 
-void Tcl_Free(char* ptr);
+void Tcl_Free(void* ptr);
 
 const char *Tcl_SetVar(Tcl_Interp* interp, const char* varName, const char* 
newValue, int flags);
 const char *Tcl_SetVar2(Tcl_Interp* interp, const char* name1, const char* 
name2, const char* newValue, int flags);
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to