Author: Armin Rigo <[email protected]>
Branch:
Changeset: r67125:662603ceb3a5
Date: 2013-09-28 18:55 +0200
http://bitbucket.org/pypy/pypy/changeset/662603ceb3a5/
Log: (amaury on issue 1616)
Fix for some missing cases.
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
@@ -28,9 +28,11 @@
return result
elif value.typePtr == typeCache.BooleanType:
- return result
+ return bool(value.internalRep.longValue)
elif value.typePtr == typeCache.ByteArrayType:
- return result
+ size = tkffi.new('int*')
+ data = tklib.Tcl_GetByteArrayFromObj(value, size)
+ return tkffi.buffer(data, size[0])[:]
elif value.typePtr == typeCache.DoubleType:
return value.internalRep.doubleValue
elif value.typePtr == typeCache.IntType:
@@ -50,7 +52,7 @@
result.append(FromObj(app, tcl_elem[0]))
return tuple(result)
elif value.typePtr == typeCache.ProcBodyType:
- return result
+ pass # fall through and return tcl object.
elif value.typePtr == typeCache.StringType:
buf = tklib.Tcl_GetUnicode(value)
length = tklib.Tcl_GetCharLength(value)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit