diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-04-27 19:13:51 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-04-27 19:13:51 -0700 |
commit | 883afc9be02cc90e8644870288ad670a02986669 (patch) | |
tree | 2a9b46537edf0aab4cb69abe461b7b2d17a691a2 | |
parent | 77d1199f8a7d7a5be06d8dfa0b0394f803fd8525 (diff) | |
download | txr-883afc9be02cc90e8644870288ad670a02986669.tar.gz txr-883afc9be02cc90e8644870288ad670a02986669.tar.bz2 txr-883afc9be02cc90e8644870288ad670a02986669.zip |
lib: diagnostic functions moved out of arith.c.
* arith.c (invalid_ops, invalid_op): Static functions removed.
* unwind.c (invalid_oips, invalid_op): Functions added here,
as external functions.
* unwind.h (invalid_oips, invalid_op): Declared.
-rw-r--r-- | arith.c | 11 | ||||
-rw-r--r-- | unwind.c | 11 | ||||
-rw-r--r-- | unwind.h | 2 |
3 files changed, 13 insertions, 11 deletions
@@ -132,17 +132,6 @@ static NORETURN void not_integer(val self, val obj) uw_throwf(type_error_s, lit("~a: ~s is not an integer"), self, obj, nao); } -static NORETURN void invalid_ops(val self, val obj1, val obj2) -{ - uw_throwf(type_error_s, lit("~a: invalid operands ~s ~s"), self, - obj1, obj2, nao); -} - -static NORETURN void invalid_op(val self, val obj) -{ - uw_throwf(type_error_s, lit("~a: invalid operand ~s"), self, obj, nao); -} - int num_to_buffer(val num, mem_t *buf, int bytes) { switch (type(num)) { @@ -848,6 +848,17 @@ val type_mismatch(val fmt, ...) abort(); } +NORETURN void invalid_ops(val self, val obj1, val obj2) +{ + uw_throwf(type_error_s, lit("~a: invalid operands ~s ~s"), self, + obj1, obj2, nao); +} + +NORETURN void invalid_op(val self, val obj) +{ + uw_throwf(type_error_s, lit("~a: invalid operand ~s"), self, obj, nao); +} + val uw_defer_warning(val args) { val msg = car(args); @@ -384,6 +384,8 @@ void uw_init(void); void uw_late_init(void); NORETURN val type_mismatch(val, ...); +NORETURN void invalid_ops(val self, val obj1, val obj2); +NORETURN void invalid_op(val self, val obj); #define uw_mark_frame \ uw_frame_t *uw_top = uw_current_frame() |