diff options
| author | Taku Fukada <naninunenor@gmail.com> | 2020-08-03 13:35:43 +0900 |
|---|---|---|
| committer | Taku Fukada <naninunenor@gmail.com> | 2020-08-07 01:01:28 +0900 |
| commit | 56c898da80df57d0e83f4e8d1ee44f4351ce1d8c (patch) | |
| tree | 06f32bb910bca32cd33e96c134b5a18f86f5c5e7 /shared-bindings/struct/__init__.c | |
| parent | 887eb3b6d9a3ef8c6300448492f1177a609feef6 (diff) | |
Modify some Python stubs
Diffstat (limited to 'shared-bindings/struct/__init__.c')
| -rw-r--r-- | shared-bindings/struct/__init__.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/shared-bindings/struct/__init__.c b/shared-bindings/struct/__init__.c index d74b96212..b886a662e 100644 --- a/shared-bindings/struct/__init__.c +++ b/shared-bindings/struct/__init__.c @@ -62,7 +62,7 @@ STATIC mp_obj_t struct_calcsize(mp_obj_t fmt_in) { } MP_DEFINE_CONST_FUN_OBJ_1(struct_calcsize_obj, struct_calcsize); -//| def pack(fmt: str, *values: ReadableBuffer) -> bytes: +//| def pack(fmt: str, *values: Any) -> bytes: //| """Pack the values according to the format string fmt. //| The return value is a bytes object encoding the values.""" //| ... @@ -80,7 +80,7 @@ STATIC mp_obj_t struct_pack(size_t n_args, const mp_obj_t *args) { } MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(struct_pack_obj, 1, MP_OBJ_FUN_ARGS_MAX, struct_pack); -//| def pack_into(fmt: str, buffer: WriteableBuffer, offset: int, *values: ReadableBuffer) -> None: +//| def pack_into(fmt: str, buffer: WriteableBuffer, offset: int, *values: Any) -> None: //| """Pack the values according to the format string fmt into a buffer //| starting at offset. offset may be negative to count from the end of buffer.""" //| ... @@ -106,7 +106,7 @@ STATIC mp_obj_t struct_pack_into(size_t n_args, const mp_obj_t *args) { } MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(struct_pack_into_obj, 3, MP_OBJ_FUN_ARGS_MAX, struct_pack_into); -//| def unpack(fmt: str, data: ReadableBuffer) -> tuple: +//| def unpack(fmt: str, data: ReadableBuffer) -> Tuple[Any, ...]: //| """Unpack from the data according to the format string fmt. The return value //| is a tuple of the unpacked values. The buffer size must match the size //| required by the format.""" @@ -124,7 +124,7 @@ STATIC mp_obj_t struct_unpack(size_t n_args, const mp_obj_t *args) { } MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(struct_unpack_obj, 2, 3, struct_unpack); -//| def unpack_from(fmt: str, data: ReadableBuffer, offset: int = 0) -> tuple: +//| def unpack_from(fmt: str, data: ReadableBuffer, offset: int = 0) -> Tuple[Any, ...]: //| """Unpack from the data starting at offset according to the format string fmt. //| offset may be negative to count from the end of buffer. The return value is //| a tuple of the unpacked values. The buffer size must be at least as big |
