Fix #ifdef __APPLE__ code is the swig Python bindings

This code was getting evaluated unintentionally at binding
generation time instead of binding file compilation time.

Addresses:
https://bugs.swift.org/browse/SR-1192

llvm-svn: 265829
This commit is contained in:
Todd Fiala 2016-04-08 18:58:07 +00:00
parent 69341e6abc
commit c4a2134f26
1 changed files with 2 additions and 2 deletions

View File

@ -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);