beremiz

fix ctypes encoding
python3
2022-10-28, GP Orcullo
8db203310f68
Parents ca814b175391
Children 814595c0ea16
fix ctypes encoding
--- a/runtime/typemapping.py Fri Oct 28 14:53:23 2022 +0800
+++ b/runtime/typemapping.py Fri Oct 28 14:56:07 2022 +0800
@@ -4,13 +4,12 @@
# See COPYING.Runtime file for copyrights details.
#
-
import ctypes
from ctypes import *
from datetime import timedelta as td
-ctypes.pythonapi.PyString_AsString.argtypes = (ctypes.c_void_p,)
-ctypes.pythonapi.PyString_AsString.restype = ctypes.POINTER(ctypes.c_char)
+ctypes.pythonapi.PyUnicode_AsUTF8.argtypes = (ctypes.c_void_p,)
+ctypes.pythonapi.PyUnicode_AsUTF8.restype = ctypes.POINTER(ctypes.c_char)
class IEC_STRING(Structure):