Skip to content

Commit

Permalink
test: fix redefinition of 'abort'
Browse files Browse the repository at this point in the history
  • Loading branch information
toyobayashi committed Feb 24, 2024
1 parent 795df8a commit 3b653fe
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
4 changes: 1 addition & 3 deletions packages/test/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
#else
#include <stddef.h>
void console_error(const char* fmt, const char* str);
void abort() {
__builtin_trap();
}
#define abort() __builtin_trap()
#define EPRINT(str) console_error("%s", (str))
#endif

Expand Down
3 changes: 0 additions & 3 deletions packages/test/runjs/binding.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
#else
void* malloc(size_t size);
void free(void* p);
void abort() {
__builtin_trap();
}
#endif

static void Finalize(napi_env env, void* data, void* hint) {
Expand Down
4 changes: 0 additions & 4 deletions packages/test/string/binding.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ size_t strlen(const char *s)
for (; *s; s++);
return s-a;
}

void abort() {
__builtin_trap();
}
#endif

#define NAPI_EXPERIMENTAL
Expand Down

0 comments on commit 3b653fe

Please sign in to comment.