Generally, changed working with tags as strings to as values.
This seems both cheaper and safer; what's not to like?
This commit is contained in:
parent
eadb125b83
commit
93d4bd14a0
17 changed files with 87 additions and 88 deletions
|
|
@ -46,11 +46,10 @@ struct cons_pointer make_integer( int64_t value, struct cons_pointer more ) {
|
|||
debug_print( L"Entering make_integer\n", DEBUG_ALLOC );
|
||||
|
||||
if ( integerp( more ) || nilp( more ) ) {
|
||||
result = allocate_cell( INTEGERTAG );
|
||||
result = allocate_cell( INTEGERTV );
|
||||
struct cons_space_object *cell = &pointer2cell( result );
|
||||
cell->payload.integer.value = value;
|
||||
cell->payload.integer.more = more;
|
||||
|
||||
}
|
||||
|
||||
debug_print( L"make_integer: returning\n", DEBUG_ALLOC );
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ struct cons_pointer make_ratio( struct cons_pointer dividend,
|
|||
if ( integerp( dividend ) && integerp( divisor ) ) {
|
||||
inc_ref( dividend );
|
||||
inc_ref( divisor );
|
||||
result = allocate_cell( RATIOTAG );
|
||||
result = allocate_cell( RATIOTV );
|
||||
struct cons_space_object *cell = &pointer2cell( result );
|
||||
cell->payload.ratio.dividend = dividend;
|
||||
cell->payload.ratio.divisor = divisor;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
* @return a real number cell wrapping this value.
|
||||
*/
|
||||
struct cons_pointer make_real( long double value ) {
|
||||
struct cons_pointer result = allocate_cell( REALTAG );
|
||||
struct cons_pointer result = allocate_cell( REALTV );
|
||||
struct cons_space_object *cell = &pointer2cell( result );
|
||||
cell->payload.real.value = value;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue