[Lldb-commits] [PATCH] ScriptInterpreterPython: %p should be used with void-pointer

David Majnemer david.majnemer at gmail.com
Tue Jul 22 14:14:17 PDT 2014


Hi zturner, tfiala,

printf's %p format specifier expects an argument of type void-pointer,
not type PyThreadState*.  Fix this with a static_cast.

http://reviews.llvm.org/D4632

Files:
  source/Interpreter/ScriptInterpreterPython.cpp

Index: source/Interpreter/ScriptInterpreterPython.cpp
===================================================================
--- source/Interpreter/ScriptInterpreterPython.cpp
+++ source/Interpreter/ScriptInterpreterPython.cpp
@@ -804,7 +804,7 @@
             int num_threads = PyThreadState_SetAsyncExc(tid, PyExc_KeyboardInterrupt);
             if (log)
                 log->Printf("ScriptInterpreterPython::NonInteractiveInputReaderCallback, eInputReaderInterrupt, tid = %ld, num_threads = %d, state = %p",
-                            tid,num_threads,state);
+                            tid, num_threads, static_cast<void *>(state));
         }
         else if (log)
             log->Printf("ScriptInterpreterPython::NonInteractiveInputReaderCallback, eInputReaderInterrupt, state = NULL");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4632.11786.patch
Type: text/x-patch
Size: 797 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20140722/8dbd9145/attachment.bin>


More information about the lldb-commits mailing list