def object_setattr_string(self, obj, attr, val):
    cstr = self.context.insert_const_string(self.module, attr)
    fnty = Type.function(Type.int(), [self.pyobj, self.cstring, self.pyobj])
    fn = self._get_function(fnty, name='PyObject_SetAttrString')
    return self.builder.call(fn, [obj, cstr, val])
def object_setattr_string(self, obj, attr, val):
    cstr = self.context.insert_const_string(self.module, attr)
    fnty = Type.function(Type.int(), [self.pyobj, self.cstring, self.pyobj])
    fn = self._get_function(fnty, name='PyObject_SetAttrString')
    return self.builder.call(fn, [obj, cstr, val])