diff options
author | Daniel Malea <daniel.malea@intel.com> | 2013-07-03 17:58:31 +0000 |
---|---|---|
committer | Daniel Malea <daniel.malea@intel.com> | 2013-07-03 17:58:31 +0000 |
commit | 9a71a7d81bc6d0a70a702b9b242e72f9fa9ddaef (patch) | |
tree | 15ba21d33a021eace460219fdfc9f6640d69592b /lldb/scripts/Python/python-swigsafecast.swig | |
parent | 4331ac7bd34e2776971392592a319051f1fa3857 (diff) | |
download | bcm5719-llvm-9a71a7d81bc6d0a70a702b9b242e72f9fa9ddaef.tar.gz bcm5719-llvm-9a71a7d81bc6d0a70a702b9b242e72f9fa9ddaef.zip |
Revert commits that cause broken builds on GCC buildbots
- build fails due to PyCallable template definition inside an extern "C" scope
This commit reverts 185240, 184893 and 184608.
llvm-svn: 185560
Diffstat (limited to 'lldb/scripts/Python/python-swigsafecast.swig')
-rw-r--r-- | lldb/scripts/Python/python-swigsafecast.swig | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/lldb/scripts/Python/python-swigsafecast.swig b/lldb/scripts/Python/python-swigsafecast.swig index da7444c9b96..7ee658fb458 100644 --- a/lldb/scripts/Python/python-swigsafecast.swig +++ b/lldb/scripts/Python/python-swigsafecast.swig @@ -1,3 +1,7 @@ +#ifndef __cplusplus +#error needs C++ to build these +#endif + // leaving this undefined ensures we will get a linker error if we try to use SBTypeToSWIGWrapper() // for a type for which we did not specialze this function template <typename SBClass> @@ -11,38 +15,6 @@ SBTypeToSWIGWrapper (SBClass& sb_object) return SBTypeToSWIGWrapper(&sb_object); } -template <typename SBClass> -PyObject* -SBTypeToSWIGWrapper (const SBClass& sb_object) -{ - return SBTypeToSWIGWrapper(&sb_object); -} - -template <> -PyObject* -SBTypeToSWIGWrapper (PyObject* py_object) -{ - return py_object; -} - -template <> -PyObject* -SBTypeToSWIGWrapper (const char* c_str) -{ - if (c_str) - return PyString_FromString(c_str); - return NULL; -} - -template <> -PyObject* -SBTypeToSWIGWrapper (unsigned int* c_int) -{ - if (!c_int) - return NULL; - return PyInt_FromLong(*c_int); -} - template <> PyObject* SBTypeToSWIGWrapper (lldb::SBProcess* process_sb) |