ref: d5fd9c48d7c5542f6059bdb0d65b973249dc474a
parent: fda389be7556bff1570f891c269df504b2d4850b
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Thu Feb 6 19:50:07 EST 2025
less ptr(...) casts
--- a/src/cvalues.c
+++ b/src/cvalues.c
@@ -795,7 +795,7 @@
cv->cbuiltin = f;
value_t sym = symbol(name, false);
- symbol_t *s = ((symbol_t*)ptr(sym));
+ symbol_t *s = ptr(sym);
s->binding = tagptr(cv, TAG_CVALUE);
ptrhash_put(&FL(reverse_dlsym_lookup_table), cv, (void*)sym);
--- a/src/equal.c
+++ b/src/equal.c
@@ -263,8 +263,8 @@
if(isvector(a) && isvector(b))
return cyc_vector_compare(a, b, table, eq);
if(isfunction(a) && isfunction(b)){
- function_t *fa = (function_t*)ptr(a);
- function_t *fb = (function_t*)ptr(b);
+ function_t *fa = ptr(a);
+ function_t *fb = ptr(b);
d = bounded_compare(fa->bcode, fb->bcode, 1, eq);
if(numval(d) != 0)
return d;
--- a/src/flisp.c
+++ b/src/flisp.c
@@ -269,7 +269,7 @@
symbol_name(value_t v)
{
if(ismanaged(v)){
- gensym_t *gs = (gensym_t*)ptr(v);
+ gensym_t *gs = ptr(v);
FL(gsnameno) = 1-FL(gsnameno);
char *n = uint2str(FL(gsname)[FL(gsnameno)]+1, sizeof(FL(gsname)[0])-1, gs->id, 10);
*(--n) = 'g';