[Lldb-commits] [lldb] r127292 - /lldb/trunk/scripts/lldb.swig

Johnny Chen johnny.chen at apple.com
Tue Mar 8 15:46:33 PST 2011


Author: johnny
Date: Tue Mar  8 17:46:33 2011
New Revision: 127292

URL: http://llvm.org/viewvc/llvm-project?rev=127292&view=rev
Log:
There's no sense checking for < 0 with a return type of size_t:

size_t
SBProcess::ReadMemory (addr_t addr, void *buf, size_t size, lldb::SBError &error);

Modified:
    lldb/trunk/scripts/lldb.swig

Modified: lldb/trunk/scripts/lldb.swig
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/lldb.swig?rev=127292&r1=127291&r2=127292&view=diff
==============================================================================
--- lldb/trunk/scripts/lldb.swig (original)
+++ lldb/trunk/scripts/lldb.swig Tue Mar  8 17:46:33 2011
@@ -109,11 +109,6 @@
 // See also SBProcess::ReadMemory.
 %typemap(argout) (void *buf, size_t size) {
    Py_XDECREF($result);   /* Blow away any previous result */
-   if (result < 0) {      /* Check for I/O error */
-       free($1);
-       PyErr_SetFromErrno(PyExc_IOError);
-       return NULL;
-   }
    $result = PyString_FromStringAndSize(static_cast<const char*>($1),result);
    free($1);
 }





More information about the lldb-commits mailing list