Skip to content

Commit e683ce3

Browse files
committed
Get rid of extra struct keywords
1 parent fcb3d3c commit e683ce3

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

include/fizzy/fizzy.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ extern "C" {
1212
#endif
1313

1414
/// The opaque data type representing a module.
15-
struct FizzyModule;
15+
typedef struct FizzyModule FizzyModule;
1616

1717
/// The opaque data type representing an instance (instantiated module).
18-
struct FizzyInstance;
18+
typedef struct FizzyInstance FizzyInstance;
1919

2020
/// The data type representing numeric values.
2121
///
@@ -46,8 +46,8 @@ typedef struct FizzyExecutionResult
4646
/// @param args Pointer to the argument array. Can be NULL iff args_size equals 0.
4747
/// @param args_size Size of the argument array.
4848
/// @param depth Call stack depth.
49-
typedef struct FizzyExecutionResult (*FizzyExternalFn)(void* context,
50-
struct FizzyInstance* instance, const union FizzyValue* args, size_t args_size, int depth);
49+
typedef FizzyExecutionResult (*FizzyExternalFn)(void* context, FizzyInstance* instance,
50+
const union FizzyValue* args, size_t args_size, int depth);
5151

5252
/// External function.
5353
typedef struct FizzyExternalFunction
@@ -64,12 +64,12 @@ typedef struct FizzyExternalFunction
6464
bool fizzy_validate(const uint8_t* wasm_binary, size_t wasm_binary_size);
6565

6666
/// Parse binary module.
67-
const struct FizzyModule* fizzy_parse(const uint8_t* wasm_binary, size_t wasm_binary_size);
67+
const FizzyModule* fizzy_parse(const uint8_t* wasm_binary, size_t wasm_binary_size);
6868

6969
/// Free resources associated with the module.
7070
///
7171
/// Should be called unless @p module was passed to fizzy_instantiate.
72-
void fizzy_free_module(const struct FizzyModule* module);
72+
void fizzy_free_module(const FizzyModule* module);
7373

7474
/// Instantiate a module.
7575
/// Takes ownership of module, i.e. @p module is invalidated after this call.
@@ -84,11 +84,11 @@ void fizzy_free_module(const struct FizzyModule* module);
8484
/// No validation is done on the number of functions passed in, nor on their order.
8585
/// When number of passed functions or their order is different from the one defined by the
8686
/// module, behaviour is undefined.
87-
struct FizzyInstance* fizzy_instantiate(const struct FizzyModule* module,
88-
const struct FizzyExternalFunction* imported_functions, size_t imported_functions_size);
87+
FizzyInstance* fizzy_instantiate(const FizzyModule* module,
88+
const FizzyExternalFunction* imported_functions, size_t imported_functions_size);
8989

9090
/// Free resources associated with the instance.
91-
void fizzy_free_instance(struct FizzyInstance* instance);
91+
void fizzy_free_instance(FizzyInstance* instance);
9292

9393
/// Execute module function.
9494
///
@@ -101,7 +101,7 @@ void fizzy_free_instance(struct FizzyInstance* instance);
101101
/// When number of passed arguments or their types are different from the ones defined by the
102102
/// function type, behaviour is undefined.
103103
FizzyExecutionResult fizzy_execute(
104-
struct FizzyInstance* instance, uint32_t func_idx, const union FizzyValue* args, int depth);
104+
FizzyInstance* instance, uint32_t func_idx, const union FizzyValue* args, int depth);
105105

106106
#ifdef __cplusplus
107107
}

0 commit comments

Comments
 (0)