runtime/typemapping.py
branchpython3
changeset 3756 8db203310f68
parent 3750 f62625418bff
child 3771 67a0df6478b3
equal deleted inserted replaced
3755:ca814b175391 3756:8db203310f68
     2 # -*- coding: utf-8 -*-
     2 # -*- coding: utf-8 -*-
     3 #
     3 #
     4 # See COPYING.Runtime file for copyrights details.
     4 # See COPYING.Runtime file for copyrights details.
     5 #
     5 #
     6 
     6 
     7 
       
     8 import ctypes
     7 import ctypes
     9 from ctypes import *
     8 from ctypes import *
    10 from datetime import timedelta as td
     9 from datetime import timedelta as td
    11 
    10 
    12 ctypes.pythonapi.PyString_AsString.argtypes = (ctypes.c_void_p,)
    11 ctypes.pythonapi.PyUnicode_AsUTF8.argtypes = (ctypes.c_void_p,)
    13 ctypes.pythonapi.PyString_AsString.restype = ctypes.POINTER(ctypes.c_char)
    12 ctypes.pythonapi.PyUnicode_AsUTF8.restype = ctypes.POINTER(ctypes.c_char)
    14 
    13 
    15 
    14 
    16 class IEC_STRING(Structure):
    15 class IEC_STRING(Structure):
    17     """
    16     """
    18     Must be changed according to changes in iec_types.h
    17     Must be changed according to changes in iec_types.h