diff options
Diffstat (limited to 'source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h')
| -rw-r--r-- | source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h | 37 | 
1 files changed, 37 insertions, 0 deletions
diff --git a/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h b/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h index c9d17c0f0fad..06264b66c283 100644 --- a/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h +++ b/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h @@ -23,8 +23,11 @@  #include "lldb/Host/File.h"  #include "lldb/Interpreter/OptionValue.h" +#include "llvm/ADT/ArrayRef.h" +  namespace lldb_private { +class PythonBytes;  class PythonString;  class PythonList;  class PythonDictionary; @@ -71,6 +74,7 @@ enum class PyObjectType      Dictionary,      List,      String, +    Bytes,      Module,      Callable,      Tuple, @@ -256,6 +260,39 @@ protected:      PyObject* m_py_obj;  }; +class PythonBytes : public PythonObject +{ +public: +    PythonBytes(); +    explicit PythonBytes(llvm::ArrayRef<uint8_t> bytes); +    PythonBytes(const uint8_t *bytes, size_t length); +    PythonBytes(PyRefType type, PyObject *o); +    PythonBytes(const PythonBytes &object); + +    ~PythonBytes() 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:  | 
