[Lldb-commits] [PATCH] D18904: Ensure swig Python type map #if __APPLE__ directive makes it into the swig output.

Todd Fiala via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 8 11:58:42 PDT 2016


tfiala created this revision.
tfiala added a reviewer: clayborg.
tfiala added a subscriber: lldb-commits.

The swig call generates our Python bindings for LLDB.  Fix a #if __APPLE___ directive in the type map file to be evaluated at LLDBWrapPython.cpp build time rather than generation time.

http://reviews.llvm.org/D18904

Files:
  scripts/Python/python-typemaps.swig

Index: scripts/Python/python-typemaps.swig
===================================================================
--- scripts/Python/python-typemaps.swig
+++ scripts/Python/python-typemaps.swig
@@ -534,7 +534,7 @@
 
 %typemap(out) FILE * {
    char mode[4] = {0};
-#ifdef __APPLE__
+%#ifdef __APPLE__
    int i = 0;
    if ($1)
    {
@@ -547,7 +547,7 @@
        else // if (flags & __SRW)
           mode[i++] = 'a';
     }
-#endif
+%#endif
    using namespace lldb_private;
    File file($1, false);
    PythonFile py_file(file, mode);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18904.53053.patch
Type: text/x-patch
Size: 534 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160408/370dd8fb/attachment.bin>


More information about the lldb-commits mailing list