summaryrefslogtreecommitdiff
path: root/src/array.h
diff options
context:
space:
mode:
authorBen Smith <binjimin@gmail.com>2017-01-31 17:16:19 -0800
committerGitHub <noreply@github.com>2017-01-31 17:16:19 -0800
commit4fdbb4647c519a42f3e54ed7a858194780ca2ae4 (patch)
tree3aebad7746c492930c32786061c655bb017fdc81 /src/array.h
parentedb3a471bc249855d5ece45dc21ee69af700b19b (diff)
downloadwabt-4fdbb4647c519a42f3e54ed7a858194780ca2ae4.tar.gz
wabt-4fdbb4647c519a42f3e54ed7a858194780ca2ae4.tar.bz2
wabt-4fdbb4647c519a42f3e54ed7a858194780ca2ae4.zip
Rename all wasm prefixes to wabt (#298)
Diffstat (limited to 'src/array.h')
-rw-r--r--src/array.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/array.h b/src/array.h
index 84a728cb..0182d772 100644
--- a/src/array.h
+++ b/src/array.h
@@ -14,45 +14,45 @@
* limitations under the License.
*/
-#ifndef WASM_ARRAY_H_
-#define WASM_ARRAY_H_
+#ifndef WABT_ARRAY_H_
+#define WABT_ARRAY_H_
#include <stddef.h>
#include "allocator.h"
#include "common.h"
-#define WASM_DEFINE_ARRAY(name, type) \
+#define WABT_DEFINE_ARRAY(name, type) \
typedef struct type##Array { \
type* data; \
size_t size; \
} type##Array; \
\
- WASM_EXTERN_C_BEGIN \
- static WASM_INLINE void wasm_destroy_##name##_array( \
- struct WasmAllocator* allocator, type##Array* array) WASM_UNUSED; \
- static WASM_INLINE void wasm_new_##name##_array( \
- struct WasmAllocator* allocator, type##Array* array, size_t size) \
- WASM_UNUSED; \
- WASM_EXTERN_C_END \
+ WABT_EXTERN_C_BEGIN \
+ static WABT_INLINE void wabt_destroy_##name##_array( \
+ struct WabtAllocator* allocator, type##Array* array) WABT_UNUSED; \
+ static WABT_INLINE void wabt_new_##name##_array( \
+ struct WabtAllocator* allocator, type##Array* array, size_t size) \
+ WABT_UNUSED; \
+ WABT_EXTERN_C_END \
\
- void wasm_destroy_##name##_array(struct WasmAllocator* allocator, \
+ void wabt_destroy_##name##_array(struct WabtAllocator* allocator, \
type##Array* array) { \
- wasm_free(allocator, array->data); \
+ wabt_free(allocator, array->data); \
} \
- void wasm_new_##name##_array(struct WasmAllocator* allocator, \
+ void wabt_new_##name##_array(struct WabtAllocator* allocator, \
type##Array* array, size_t size) { \
array->size = size; \
array->data = \
- wasm_alloc_zero(allocator, size * sizeof(type), WASM_DEFAULT_ALIGN); \
+ wabt_alloc_zero(allocator, size * sizeof(type), WABT_DEFAULT_ALIGN); \
}
-#define WASM_DESTROY_ARRAY_AND_ELEMENTS(allocator, v, name) \
+#define WABT_DESTROY_ARRAY_AND_ELEMENTS(allocator, v, name) \
{ \
size_t i; \
for (i = 0; i < (v).size; ++i) \
- wasm_destroy_##name(allocator, &((v).data[i])); \
- wasm_destroy_##name##_array(allocator, &(v)); \
+ wabt_destroy_##name(allocator, &((v).data[i])); \
+ wabt_destroy_##name##_array(allocator, &(v)); \
}
-#endif /* WASM_ARRAY_H_ */
+#endif /* WABT_ARRAY_H_ */