runtime/typemapping.py
branchpython3
changeset 3756 8db203310f68
parent 3750 f62625418bff
child 3771 67a0df6478b3
--- 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):