diff --git a/python/src/deltachat/account.py b/python/src/deltachat/account.py index e6749c7ba..b1b08b43b 100644 --- a/python/src/deltachat/account.py +++ b/python/src/deltachat/account.py @@ -284,9 +284,9 @@ class Account: :returns: :class:`deltachat.contact.Contact` instance. """ (name, addr) = self.get_contact_addr_and_name(obj, name) - name = as_dc_charpointer(name) - addr = as_dc_charpointer(addr) - contact_id = lib.dc_create_contact(self._dc_context, name, addr) + name_c = as_dc_charpointer(name) + addr_c = as_dc_charpointer(addr) + contact_id = lib.dc_create_contact(self._dc_context, name_c, addr_c) return Contact(self, contact_id) def get_contact(self, obj) -> Optional[Contact]: diff --git a/python/src/deltachat/chat.py b/python/src/deltachat/chat.py index 77fac073d..e666b6cd4 100644 --- a/python/src/deltachat/chat.py +++ b/python/src/deltachat/chat.py @@ -162,8 +162,8 @@ class Chat: :param name: as a unicode string. :returns: True on success, False otherwise """ - name = as_dc_charpointer(name) - return bool(lib.dc_set_chat_name(self.account._dc_context, self.id, name)) + name_c = as_dc_charpointer(name) + return bool(lib.dc_set_chat_name(self.account._dc_context, self.id, name_c)) def get_color(self): """return the color of the chat.