mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-08 13:37:35 +02:00
no more sexp_symbol_string, accessing sexp_symbol_data directly
This commit is contained in:
parent
db5927abf7
commit
f58670b531
1 changed files with 3 additions and 4 deletions
|
@ -74,8 +74,7 @@ static int sexp_object_compare (sexp ctx, sexp a, sexp b) {
|
||||||
res = strcmp(sexp_string_data(a), sexp_string_data(b));
|
res = strcmp(sexp_string_data(a), sexp_string_data(b));
|
||||||
break;
|
break;
|
||||||
case SEXP_SYMBOL:
|
case SEXP_SYMBOL:
|
||||||
res = strcmp(sexp_string_data(sexp_symbol_string(a)),
|
res = strcmp(sexp_symbol_data(a), sexp_symbol_data(b));
|
||||||
sexp_string_data(sexp_symbol_string(b)));
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
res = 0;
|
res = 0;
|
||||||
|
@ -84,7 +83,7 @@ static int sexp_object_compare (sexp ctx, sexp a, sexp b) {
|
||||||
}
|
}
|
||||||
#if SEXP_USE_HUFF_SYMS
|
#if SEXP_USE_HUFF_SYMS
|
||||||
} else if (sexp_lsymbolp(a) && sexp_isymbolp(b)) {
|
} else if (sexp_lsymbolp(a) && sexp_isymbolp(b)) {
|
||||||
res = strcmp(sexp_string_data(sexp_symbol_string(a)),
|
res = strcmp(sexp_symbol_data(a),
|
||||||
sexp_string_data(sexp_write_to_string(ctx, b)));
|
sexp_string_data(sexp_write_to_string(ctx, b)));
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
|
@ -94,7 +93,7 @@ static int sexp_object_compare (sexp ctx, sexp a, sexp b) {
|
||||||
#if SEXP_USE_HUFF_SYMS
|
#if SEXP_USE_HUFF_SYMS
|
||||||
if (sexp_isymbolp(a) && sexp_lsymbolp(b))
|
if (sexp_isymbolp(a) && sexp_lsymbolp(b))
|
||||||
res = strcmp(sexp_string_data(sexp_write_to_string(ctx, a)),
|
res = strcmp(sexp_string_data(sexp_write_to_string(ctx, a)),
|
||||||
sexp_string_data(sexp_symbol_string(b)));
|
sexp_symbol_data(b));
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
res = -1;
|
res = -1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue