From 7d730006e46c1a609a6b7e5f0e8c5c24d4f6d32c Mon Sep 17 00:00:00 2001 From: lyon1998 Date: Sun, 17 Apr 2022 22:56:21 +0800 Subject: [PATCH] use ctypeUtils in ctype method --- package/ctypes/ctypes.c | 6 +++--- .../linux/package/pikascript/pikascript-lib/ctypes/ctypes.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package/ctypes/ctypes.c b/package/ctypes/ctypes.c index 168fb67e7..add315a85 100644 --- a/package/ctypes/ctypes.c +++ b/package/ctypes/ctypes.c @@ -4,15 +4,15 @@ #include "ctypes_utils.h" void ctypes_c_uint___init__(PikaObj* self, int value) { - obj_setInt(self, "value", value); + ctypesUtils_setInt(self, value); } void ctypes_c_wchar_p___init__(PikaObj* self, char* value) { - obj_setStr(self, "value", value); + ctypesUtils_setStr(self, value); } int ctypes_Test_add(PikaObj* self, PikaObj* c_uint1, PikaObj* c_uint2) { - return obj_getInt(c_uint1, "value") + obj_getInt(c_uint2, "value"); + return ctypesUtils_getInt(c_uint1) + ctypesUtils_getInt(c_uint2); } int ctypes_Test_dc_cpuapdu_hex(PikaObj* self, diff --git a/port/linux/package/pikascript/pikascript-lib/ctypes/ctypes.c b/port/linux/package/pikascript/pikascript-lib/ctypes/ctypes.c index 168fb67e7..add315a85 100644 --- a/port/linux/package/pikascript/pikascript-lib/ctypes/ctypes.c +++ b/port/linux/package/pikascript/pikascript-lib/ctypes/ctypes.c @@ -4,15 +4,15 @@ #include "ctypes_utils.h" void ctypes_c_uint___init__(PikaObj* self, int value) { - obj_setInt(self, "value", value); + ctypesUtils_setInt(self, value); } void ctypes_c_wchar_p___init__(PikaObj* self, char* value) { - obj_setStr(self, "value", value); + ctypesUtils_setStr(self, value); } int ctypes_Test_add(PikaObj* self, PikaObj* c_uint1, PikaObj* c_uint2) { - return obj_getInt(c_uint1, "value") + obj_getInt(c_uint2, "value"); + return ctypesUtils_getInt(c_uint1) + ctypesUtils_getInt(c_uint2); } int ctypes_Test_dc_cpuapdu_hex(PikaObj* self,