From bf42677bd15bdbf59f24629f400798d92c7540a2 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Wed, 5 Jul 2023 08:04:20 +0900 Subject: [PATCH] retire trap() everything uses trap_with_id these days. --- lib/exec.c | 11 ----------- lib/exec.h | 2 -- 2 files changed, 13 deletions(-) diff --git a/lib/exec.c b/lib/exec.c index 9a866ad3..198664a1 100644 --- a/lib/exec.c +++ b/lib/exec.c @@ -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, ...) { diff --git a/lib/exec.h b/lib/exec.h index b7b77323..3a5f7b17 100644 --- a/lib/exec.h +++ b/lib/exec.h @@ -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,