Skip to content

Commit 808a321

Browse files
committed
Define some ctypes mapping
to be able to build from git vlc. libvlc_media_read_cb is not correctly wrapped, this should be more properly fixed
1 parent c918373 commit 808a321

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

generator/generate.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,6 +1042,10 @@ class PythonGenerator(_Generator):
10421042
'libvlc_player_programlist_t*': 'ctypes.c_void_p', # Opaque struct, do not mess with it.
10431043
'libvlc_picture_list_t*': 'ctypes.c_void_p', # Opaque struct, do not mess with it.
10441044

1045+
# FIXME Temporary fix to generate valid code for the mapping of
1046+
# libvlc_media_read_cb
1047+
'ptrdiff_t': 'ctypes.c_void_p',
1048+
10451049
# FIXME: gross hack to see if it makes things approximately work.#
10461050
# Unions should be properly converted
10471051
'union { libvlc_audio_track_t*': 'ctypes.POINTER(AudioTrack)',
@@ -1056,12 +1060,15 @@ class PythonGenerator(_Generator):
10561060
'bool': 'ctypes.c_bool',
10571061
'bool*': 'ctypes.POINTER(ctypes.c_bool)',
10581062
'char**': 'ListPOINTER(ctypes.c_char_p)',
1063+
'double': 'ctypes.c_double',
1064+
'double*': 'ctypes.POINTER(ctypes.c_double)',
10591065
'float': 'ctypes.c_float',
10601066
'int': 'ctypes.c_int',
10611067
'int*': 'ctypes.POINTER(ctypes.c_int)', # _video_get_cursor
10621068
'uintptr_t*': 'ctypes.POINTER(ctypes.c_uint)',
10631069
'uint16_t': 'ctypes.c_uint16',
10641070
'int64_t': 'ctypes.c_int64',
1071+
'int64_t*': 'ctypes.POINTER(ctypes.c_int64)',
10651072
'uint64_t': 'ctypes.c_uint64',
10661073
'uint64_t*': 'ctypes.POINTER(ctypes.c_uint64)',
10671074
'short': 'ctypes.c_short',

0 commit comments

Comments
 (0)