mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-13 23:27:12 +00:00
Remove unnecessary struct definition for SX hash arguments.
modified: inc/sxhashdefs.h modified: src/miscn.c modified: src/sxhash.c
This commit is contained in:
parent
8612d84761
commit
52c04137b0
@ -1,7 +1,6 @@
|
||||
#ifndef SXHASHDEFS_H
|
||||
#define SXHASHDEFS_H 1
|
||||
typedef struct { LispPTR object; } SXHASHARG;
|
||||
LispPTR SX_hash(register SXHASHARG *args);
|
||||
LispPTR STRING_EQUAL_HASHBITS(SXHASHARG *args);
|
||||
LispPTR STRING_HASHBITS(SXHASHARG *args);
|
||||
LispPTR SX_hash(LispPTR object);
|
||||
LispPTR STRING_EQUAL_HASHBITS(LispPTR object);
|
||||
LispPTR STRING_HASHBITS(LispPTR object);
|
||||
#endif
|
||||
|
||||
@ -72,11 +72,11 @@ int OP_miscn(int misc_index, int arg_count) {
|
||||
N_GETNUMBER(args[0], user_subr, do_ufn);
|
||||
if ((result = UserSubr(user_subr, arg_count - 1, &args[1])) < 0) goto do_ufn;
|
||||
} break;
|
||||
case miscn_SXHASH: result = SX_hash(args); break;
|
||||
case miscn_SXHASH: result = SX_hash(args[0]); break;
|
||||
|
||||
case miscn_STRING_EQUAL_HASHBITS: result = STRING_EQUAL_HASHBITS(args); break;
|
||||
case miscn_STRING_EQUAL_HASHBITS: result = STRING_EQUAL_HASHBITS(args[0]); break;
|
||||
|
||||
case miscn_STRINGHASHBITS: result = STRING_HASHBITS(args); break;
|
||||
case miscn_STRINGHASHBITS: result = STRING_HASHBITS(args[0]); break;
|
||||
|
||||
case miscn_VALUES:
|
||||
if (arg_count > 255) {
|
||||
|
||||
12
src/sxhash.c
12
src/sxhash.c
@ -50,8 +50,8 @@ static unsigned short stringhash(LispPTR obj);
|
||||
/* */
|
||||
/****************************************************************/
|
||||
|
||||
LispPTR SX_hash(register SXHASHARG *args) {
|
||||
return (S_POSITIVE | (0xFFFF & (sxhash(args->object))));
|
||||
LispPTR SX_hash(LispPTR object) {
|
||||
return (S_POSITIVE | (0xFFFF & (sxhash(object))));
|
||||
/* Smash the top of the stack to a 0xe, offset */
|
||||
}
|
||||
|
||||
@ -194,8 +194,8 @@ static unsigned short sxhash_pathname(LispPTR obj) {
|
||||
/* */
|
||||
/****************************************************************/
|
||||
|
||||
LispPTR STRING_EQUAL_HASHBITS(SXHASHARG *args) {
|
||||
return (S_POSITIVE | (0xFFFF & (stringequalhash(args->object))));
|
||||
LispPTR STRING_EQUAL_HASHBITS(LispPTR object) {
|
||||
return (S_POSITIVE | (0xFFFF & (stringequalhash(object))));
|
||||
} /* STRING_EQUAL_HASHBITS */
|
||||
|
||||
static unsigned short stringequalhash(LispPTR obj) {
|
||||
@ -262,8 +262,8 @@ static unsigned short stringequalhash(LispPTR obj) {
|
||||
/* */
|
||||
/****************************************************************/
|
||||
|
||||
LispPTR STRING_HASHBITS(SXHASHARG *args) {
|
||||
return (S_POSITIVE | (0xFFFF & (stringhash(args->object))));
|
||||
LispPTR STRING_HASHBITS(LispPTR object) {
|
||||
return (S_POSITIVE | (0xFFFF & (stringhash(object))));
|
||||
} /* STRING_HASHBITS */
|
||||
|
||||
static unsigned short stringhash(LispPTR obj) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user