diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-11-01 19:16:32 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-11-01 19:16:32 +0100 |
commit | a0512eaf305d54661adec6893154161e5be01b2e (patch) | |
tree | 4485be9339b6d3c548affacf08bec6fc961c3535 /include | |
parent | dcb6ffdb2acab40702bc3519f74617d7846b5625 (diff) |
treewide: fix typo in exported function names and types
Fix instances of misspelled "resource".
This commit breaks the exported libucode ABI.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'include')
-rw-r--r-- | include/ucode/lib.h | 10 | ||||
-rw-r--r-- | include/ucode/types.h | 18 |
2 files changed, 14 insertions, 14 deletions
diff --git a/include/ucode/lib.h b/include/ucode/lib.h index 1f30cba..a033dfd 100644 --- a/include/ucode/lib.h +++ b/include/ucode/lib.h @@ -39,7 +39,7 @@ bool uc_error_context_format(uc_stringbuf_t *buf, uc_source_t *src, uc_value_t * static inline void * _uc_fn_this(uc_vm_t *vm, const char *expected_type) { - return ucv_ressource_dataptr(vm->callframes.entries[vm->callframes.count - 1].ctx, expected_type); + return ucv_resource_dataptr(vm->callframes.entries[vm->callframes.count - 1].ctx, expected_type); } #define uc_fn_this(...) _uc_fn_this(vm, __VA_ARGS__) @@ -63,12 +63,12 @@ _uc_fn_arg(uc_vm_t *vm, size_t nargs, size_t n) /* ressource type helper */ static inline uc_value_t * -uc_ressource_new(uc_ressource_type_t *type, void *data) +uc_resource_new(uc_resource_type_t *type, void *data) { - return ucv_ressource_new(type, data); + return ucv_resource_new(type, data); } -static inline uc_ressource_type_t * +static inline uc_resource_type_t * _uc_type_declare(uc_vm_t *vm, const char *name, const uc_function_list_t *list, size_t len, void (*freefn)(void *)) { uc_value_t *proto = ucv_object_new(NULL); @@ -77,7 +77,7 @@ _uc_type_declare(uc_vm_t *vm, const char *name, const uc_function_list_t *list, ucv_object_add(proto, list[len].name, ucv_cfunction_new(list[len].name, list[len].func)); - return ucv_ressource_type_add(vm, name, proto, freefn); + return ucv_resource_type_add(vm, name, proto, freefn); } #define uc_type_declare(vm, name, functions, freefn) \ diff --git a/include/ucode/types.h b/include/ucode/types.h index 7473f22..ac7376b 100644 --- a/include/ucode/types.h +++ b/include/ucode/types.h @@ -188,15 +188,15 @@ typedef struct { const char *name; uc_value_t *proto; void (*free)(void *); -} uc_ressource_type_t; +} uc_resource_type_t; typedef struct { uc_value_t header; - uc_ressource_type_t *type; + uc_resource_type_t *type; void *data; -} uc_ressource_t; +} uc_resource_t; -uc_declare_vector(uc_ressource_types_t, uc_ressource_type_t *); +uc_declare_vector(uc_resource_types_t, uc_resource_type_t *); /* Parser definitions */ @@ -252,7 +252,7 @@ struct uc_vm { uc_value_t *globals; uc_source_t *sources; uc_weakref_t values; - uc_ressource_types_t restypes; + uc_resource_types_t restypes; union { uint32_t u32; int32_t s32; @@ -344,11 +344,11 @@ uc_value_t *ucv_cfunction_new(const char *, uc_cfn_ptr_t); uc_value_t *ucv_closure_new(uc_vm_t *, uc_function_t *, bool); -uc_ressource_type_t *ucv_ressource_type_add(uc_vm_t *, const char *, uc_value_t *, void (*)(void *)); -uc_ressource_type_t *ucv_ressource_type_lookup(uc_vm_t *, const char *); +uc_resource_type_t *ucv_resource_type_add(uc_vm_t *, const char *, uc_value_t *, void (*)(void *)); +uc_resource_type_t *ucv_resource_type_lookup(uc_vm_t *, const char *); -uc_value_t *ucv_ressource_new(uc_ressource_type_t *, void *); -void **ucv_ressource_dataptr(uc_value_t *, const char *); +uc_value_t *ucv_resource_new(uc_resource_type_t *, void *); +void **ucv_resource_dataptr(uc_value_t *, const char *); uc_value_t *ucv_regexp_new(const char *, bool, bool, bool, char **); |