From: Tom Zanussi Date: Fri, 2 Apr 2010 04:58:25 +0000 (-0500) Subject: perf/scripts: Tuple was set from long in both branches in python_process_event() X-Git-Tag: v2.6.34-rc4~75^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1dcc03cb8ee0f5718491e8c518257238dc64e00;p=pandora-kernel.git perf/scripts: Tuple was set from long in both branches in python_process_event() This is a fix to the signed/unsigned field handling in the Python scripting engine, based on a patch from Roel Kluin. Basically, Python wants to use a PyInt (which is internally a long) if it can i.e. if the value will fit into that type. If not, it stores it into a PyLong, which isn't actually a long, but an arbitrary-precision integer variable. The code below is similar to to what Python does internally, and it seems to work as expected on the x86 and x86_64 sytems I tested it on. Signed-off-by: Tom Zanussi Cc: Arnaldo Carvalho de Melo Cc: Roel Kluin Cc: Frederic Weisbecker Cc: rostedt@goodmis.org LKML-Reference: <1270184305.6422.10.camel@tropicana> Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed