Skip to content

Commit 8de86f4

Browse files
authored
fix: Specify required argument types for variadic functions (#1850)
1 parent 71bbac2 commit 8de86f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

discord/opus.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def _err_ne(result: T, func: Callable, args: list) -> T:
147147
# The fourth is the error handler.
148148
exported_functions: list[tuple[Any, ...]] = [
149149
# Generic
150-
("opus_get_version_string", None, ctypes.c_char_p, None),
150+
("opus_get_version_string", [], ctypes.c_char_p, None),
151151
("opus_strerror", [ctypes.c_int], ctypes.c_char_p, None),
152152
# Encoder functions
153153
("opus_encoder_get_size", [ctypes.c_int], ctypes.c_int, None),
@@ -169,7 +169,7 @@ def _err_ne(result: T, func: Callable, args: list) -> T:
169169
ctypes.c_int32,
170170
_err_lt,
171171
),
172-
("opus_encoder_ctl", None, ctypes.c_int32, _err_lt),
172+
("opus_encoder_ctl", [EncoderStructPtr, ctypes.c_int], ctypes.c_int32, _err_lt),
173173
("opus_encoder_destroy", [EncoderStructPtr], None, None),
174174
# Decoder functions
175175
("opus_decoder_get_size", [ctypes.c_int], ctypes.c_int, None),
@@ -205,7 +205,7 @@ def _err_ne(result: T, func: Callable, args: list) -> T:
205205
ctypes.c_int,
206206
_err_lt,
207207
),
208-
("opus_decoder_ctl", None, ctypes.c_int32, _err_lt),
208+
("opus_decoder_ctl", [DecoderStructPtr, ctypes.c_int], ctypes.c_int32, _err_lt),
209209
("opus_decoder_destroy", [DecoderStructPtr], None, None),
210210
(
211211
"opus_decoder_get_nb_samples",

0 commit comments

Comments
 (0)