diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-03-14 12:02:02 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-03-14 12:02:02 -0700 |
commit | 488bc2f599aa6a2be792e36033ce087a9c5c7577 (patch) | |
tree | 41e9ebb73fc761ed60e8d988a0dadd10ebd7f3b6 /rand.c | |
parent | d784d188d5da7c5e8d7253b7273c8e71f86485bc (diff) | |
download | txr-488bc2f599aa6a2be792e36033ce087a9c5c7577.tar.gz txr-488bc2f599aa6a2be792e36033ce087a9c5c7577.tar.bz2 txr-488bc2f599aa6a2be792e36033ce087a9c5c7577.zip |
lib: fix neglect to use self variable.
* arith.c (toint): Use self instead of repeating function name
in diagnostic.
* ftw.c (ftw_wrap): Likewise.
* glib.c (glow_wrap): Likewise.
* rand.c (make_random_state, random): Likewise.
* lib.c (nreverse, reverse, remove_if, int_str, less, chr_str,
chr_str_set, unintern, rehome_sym, in): Likewise.
(vector, obj_print_impl): Pass self to helper function instead
of repeating identical literal.
Diffstat (limited to 'rand.c')
-rw-r--r-- | rand.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -182,8 +182,8 @@ val make_random_state(val seed, val warmup) return rs; } else if (vectorp(seed)) { if (length(seed) < num_fast(17)) - uw_throwf(error_s, lit("make-random-state: vector ~s too short"), - seed, nao); + uw_throwf(error_s, lit("~a: vector ~s too short"), + self, seed, nao); for (i = 0; i < 16; i++) r->state[i] = c_unum(seed->v.vec[i], self); @@ -191,8 +191,8 @@ val make_random_state(val seed, val warmup) r->cur = c_num(seed->v.vec[i], self); return rs; } else { - uw_throwf(error_s, lit("make-random-state: seed ~s is not a number"), - seed, nao); + uw_throwf(error_s, lit("~a: seed ~s is not a number"), + self, seed, nao); } while (i > 0 && r->state[i - 1] == 0) @@ -353,8 +353,8 @@ val random(val state, val modulus) } } - uw_throwf(numeric_error_s, lit("random: invalid modulus ~s"), - modulus, nao); + uw_throwf(numeric_error_s, lit("~a: invalid modulus ~s"), + self, modulus, nao); } val rnd(val modulus, val state) |