From fa0fa3d0c01400c3cacc2bca24bc0b95d137d6a2 Mon Sep 17 00:00:00 2001 From: uye <99072975+ABA2396@users.noreply.github.com> Date: Tue, 11 Jun 2024 03:10:22 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=20py=20=E5=9B=9E?= =?UTF-8?q?=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Python/asst/asst.py | 5 +++-- src/Python/asst/utils.py | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Python/asst/asst.py b/src/Python/asst/asst.py index b53339442f..45f3bf5f2d 100644 --- a/src/Python/asst/asst.py +++ b/src/Python/asst/asst.py @@ -86,14 +86,15 @@ class Asst: ``callback``: 回调函数 ``arg``: 自定义参数 """ - + self.__callback = callback if callback: self.__ptr = Asst.__lib.AsstCreateEx(callback, arg) else: self.__ptr = Asst.__lib.AsstCreate() def __del__(self): - Asst.__lib.AsstDestroy(self.__ptr) + if self.__callback: + Asst.__lib.AsstDestroy(self.__ptr) self.__ptr = None def set_instance_option(self, option_type: InstanceOptionType, option_value: str): diff --git a/src/Python/asst/utils.py b/src/Python/asst/utils.py index 4f28428f6a..f65e0ca05e 100644 --- a/src/Python/asst/utils.py +++ b/src/Python/asst/utils.py @@ -24,6 +24,10 @@ class Message(Enum): AllTasksCompleted = auto() + AsyncCallInfo = auto() + + Destroyed = auto() + TaskChainError = 10000 TaskChainStart = auto()