Skip to content

Commit 3c3a8da

Browse files
authored
Merge pull request #61 from bmwcarit/c_char_p_fix
Fix string passing to c_char_p for Python3
2 parents 809af0d + 829f4fd commit 3c3a8da

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

dlt/dlt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ def read_message(self, verbose=False):
10191019
if msg.standardheader.htyp & DLT_HTYP_WEID:
10201020
dltlib.dlt_set_storageheader(msg.p_storageheader, msg.headerextra.ecu)
10211021
else:
1022-
dltlib.dlt_set_storageheader(msg.p_storageheader, ctypes.c_char_p(""))
1022+
dltlib.dlt_set_storageheader(msg.p_storageheader, ctypes.c_char_p(b""))
10231023

10241024
return msg
10251025

@@ -1038,7 +1038,7 @@ def msg_callback(msg, data): # pylint: disable=no-self-argument
10381038
if msg.contents.p_standardheader.contents.htyp & DLT_HTYP_WEID:
10391039
dltlib.dlt_set_storageheader(msg.contents.p_storageheader, msg.contents.headerextra.ecu)
10401040
else:
1041-
dltlib.dlt_set_storageheader(msg.contents.p_storageheader, ctypes.c_char_p(""))
1041+
dltlib.dlt_set_storageheader(msg.contents.p_storageheader, ctypes.c_char_p(b""))
10421042

10431043
print(msg.contents)
10441044
return 0

0 commit comments

Comments
 (0)