summaryrefslogtreecommitdiff
path: root/shared-bindings/struct/__init__.c
diff options
context:
space:
mode:
authorTaku Fukada <naninunenor@gmail.com>2020-07-24 03:22:41 +0900
committerTaku Fukada <naninunenor@gmail.com>2020-07-24 18:20:03 +0900
commit54a342a7f5b74f32c7a53ea483d9046e688b9830 (patch)
treecbffe76818a71ffa52a8b7151baed21c0b387c5b /shared-bindings/struct/__init__.c
parent543708416bc19bc1e77d859d013c4757433ad255 (diff)
Add and correct some type hints
Diffstat (limited to 'shared-bindings/struct/__init__.c')
-rw-r--r--shared-bindings/struct/__init__.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/shared-bindings/struct/__init__.c b/shared-bindings/struct/__init__.c
index de357dde4..d74b96212 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: string, *values: ReadableBuffer) -> bytes:
+//| def pack(fmt: str, *values: ReadableBuffer) -> 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: string, buffer: WriteableBuffer, offset: int, *values: readableBuffer) -> None:
+//| def pack_into(fmt: str, buffer: WriteableBuffer, offset: int, *values: ReadableBuffer) -> 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: string, data: ReadableBuffer) -> tuple:
+//| def unpack(fmt: str, data: ReadableBuffer) -> tuple:
//| """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: string, data: ReadableBuffer, offset: int = 0) -> tuple:
+//| def unpack_from(fmt: str, data: ReadableBuffer, offset: int = 0) -> tuple:
//| """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