From 478619cf9a24ad8eac806959ca6a289a9beb71ae Mon Sep 17 00:00:00 2001 From: Muhammad Omair Javaid Date: Thu, 23 Apr 2020 04:35:30 +0500 Subject: Revert "get rid of PythonInteger::GetInteger()" This reverts commit 7375212172951d2fc283c81d03c1a8588c3280c6. This causes multiple test failures on LLDB AArch64 Linux buildbot. http://lab.llvm.org:8011/builders/lldb-aarch64-ubuntu/builds/3695 Differential Revision: https://reviews.llvm.org/D78462 --- .../ScriptInterpreter/Python/PythonDataObjects.h | 27 ++-------------------- 1 file changed, 2 insertions(+), 25 deletions(-) (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h') diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h index b09f42e..1689680 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h @@ -370,27 +370,6 @@ public: return r; } - llvm::Expected AsUnsignedLongLong() { - if (!m_py_obj) - return nullDeref(); - assert(!PyErr_Occurred()); - long long r = PyLong_AsUnsignedLongLong(m_py_obj); - if (PyErr_Occurred()) - return exception(); - return r; - } - - llvm::Expected AsModuloUnsignedLongLong() const { - // wraps on overflow, instead of raising an error. - if (!m_py_obj) - return nullDeref(); - assert(!PyErr_Occurred()); - unsigned long long r = PyLong_AsUnsignedLongLongMask(m_py_obj); - if (PyErr_Occurred()) - return exception(); - return r; - } - llvm::Expected IsInstance(const PythonObject &cls) { if (!m_py_obj || !cls.IsValid()) return nullDeref(); @@ -421,10 +400,6 @@ template <> llvm::Expected As(llvm::Expected &&obj); template <> -llvm::Expected -As(llvm::Expected &&obj); - -template <> llvm::Expected As(llvm::Expected &&obj); @@ -516,6 +491,8 @@ public: static bool Check(PyObject *py_obj); static void Convert(PyRefType &type, PyObject *&py_obj); + int64_t GetInteger() const; + void SetInteger(int64_t value); StructuredData::IntegerSP CreateStructuredInteger() const; -- cgit v1.1