def __init__(self, s=None): if s == None: self.strg = gtlib.gt_str_new() self.own = True elif isinstance(s, str): self.strg = gtlib.gt_str_new_cstr(str(s).encode('UTF-8')) self.own = True elif isinstance(s, bytes): self.strg = gtlib.gt_str_new_cstr(s) self.own = True else: self.strg = s self.own = False self._as_parameter_ = self.strg
def __init__(self, s=None): if s == None or isinstance(s, str): self.strg = gtlib.gt_str_new_cstr(s) self.own = True else: self.strg = s self.own = False self._as_parameter_ = self.strg