Skip to content

Commit

Permalink
retire trap()
Browse files Browse the repository at this point in the history
everything uses trap_with_id these days.
  • Loading branch information
yamt committed Jul 5, 2023
1 parent fd918e9 commit bf42677
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
11 changes: 0 additions & 11 deletions lib/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,6 @@ vtrap(struct exec_context *ctx, enum trapid id, const char *fmt, va_list ap)
return ETOYWASMTRAP;
}

int
trap(struct exec_context *ctx, const char *fmt, ...)
{
int ret;
va_list ap;
va_start(ap, fmt);
ret = vtrap(ctx, TRAP_MISC, fmt, ap);
va_end(ap);
return ret;
}

int
trap_with_id(struct exec_context *ctx, enum trapid id, const char *fmt, ...)
{
Expand Down
2 changes: 0 additions & 2 deletions lib/exec.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ int invoke(struct funcinst *finst, const struct resulttype *paramtype,

int check_interrupt(struct exec_context *ctx);

int trap(struct exec_context *ctx, const char *fmt, ...)
__attribute__((__format__(__printf__, 2, 3)));
int trap_with_id(struct exec_context *ctx, enum trapid id, const char *fmt,
...) __attribute__((__format__(__printf__, 3, 4)));
int memory_getptr(struct exec_context *ctx, uint32_t memidx, uint32_t ptr,
Expand Down

0 comments on commit bf42677

Please sign in to comment.