diff options
| author | Ed Maste <emaste@FreeBSD.org> | 2016-08-17 08:51:41 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@FreeBSD.org> | 2016-08-17 08:51:41 +0000 |
| commit | 4bb0738ee7438ed572a4b9d8b609271b029de5b8 (patch) | |
| tree | df6626d93c7b7fd6ab01b8ff87deb1c146b6bf18 /contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h | |
| parent | 6f79a7d5fccb951f43a7846ef824a0b42b7a977a (diff) | |
| parent | 98043205754656c922673ff69114f7a7751037b6 (diff) | |
Notes
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h')
| -rw-r--r-- | contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h b/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h index 06264b66c283..78245a98d0b8 100644 --- a/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h +++ b/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h @@ -75,6 +75,7 @@ enum class PyObjectType List, String, Bytes, + ByteArray, Module, Callable, Tuple, @@ -293,6 +294,39 @@ public: CreateStructuredString() const; }; +class PythonByteArray : public PythonObject +{ +public: + PythonByteArray(); + explicit PythonByteArray(llvm::ArrayRef<uint8_t> bytes); + PythonByteArray(const uint8_t *bytes, size_t length); + PythonByteArray(PyRefType type, PyObject *o); + PythonByteArray(const PythonBytes &object); + + ~PythonByteArray() override; + + static bool + Check(PyObject *py_obj); + + // Bring in the no-argument base class version + using PythonObject::Reset; + + void + Reset(PyRefType type, PyObject *py_obj) override; + + llvm::ArrayRef<uint8_t> + GetBytes() const; + + size_t + GetSize() const; + + void + SetBytes(llvm::ArrayRef<uint8_t> stringbytes); + + StructuredData::StringSP + CreateStructuredString() const; +}; + class PythonString : public PythonObject { public: @@ -468,6 +502,7 @@ class PythonCallable : public PythonObject public: struct ArgInfo { size_t count; + bool is_bound_method : 1; bool has_varargs : 1; bool has_kwargs : 1; }; @@ -525,6 +560,8 @@ class PythonFile : public PythonObject void Reset(PyRefType type, PyObject *py_obj) override; void Reset(File &file, const char *mode); + static uint32_t GetOptionsFromMode(llvm::StringRef mode); + bool GetUnderlyingFile(File &file) const; }; |
