Skip to content

Commit

Permalink
types: ucv_resource_create(): rename typename parameter to type
Browse files Browse the repository at this point in the history
Since `typename` is a reserved word in C++ avoid using it to allow
successful compilation with a C++ compiler.

Fixes: #248
Signed-off-by: Jo-Philipp Wich <[email protected]>
  • Loading branch information
jow- committed Dec 4, 2024
1 parent c3e468b commit c71444e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/ucode/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -433,11 +433,11 @@ void *ucv_resource_data(uc_value_t *uv, const char *);
void **ucv_resource_dataptr(uc_value_t *, const char *);

static inline uc_value_t *
ucv_resource_create(uc_vm_t *vm, const char *typename, void *value)
ucv_resource_create(uc_vm_t *vm, const char *type, void *value)
{
uc_resource_type_t *t = NULL;

if (typename && (t = ucv_resource_type_lookup(vm, typename)) == NULL)
if (type && (t = ucv_resource_type_lookup(vm, type)) == NULL)
return NULL;

return ucv_resource_new(t, value);
Expand Down

0 comments on commit c71444e

Please sign in to comment.