From 13a793f7ad19f43ff97c058becb76182b0159452 Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Wed, 15 May 2019 15:17:57 -0700 Subject: first half of the refactor adding getters and setters for init created properties --- python/databuffer.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'python/databuffer.py') diff --git a/python/databuffer.py b/python/databuffer.py index 8644a75e..3d754090 100644 --- a/python/databuffer.py +++ b/python/databuffer.py @@ -34,6 +34,8 @@ class DataBuffer(object): self.handle = core.handle_of_type(handle, core.BNDataBuffer) elif isinstance(contents, int) or isinstance(contents, long): self.handle = core.BNCreateDataBuffer(None, contents) + elif isinstance(contents, str): + self.handle = core.BNCreateDataBuffer(contents.encode(), len(contents.encode())) elif isinstance(contents, DataBuffer): self.handle = core.BNDuplicateDataBuffer(contents.handle) else: -- cgit v1.3.1