static __inline void assign_symbol_name(HashTable ht, Symbol symbol, Any name) { if ( ht->refer == NAME_both || ht->refer == NAME_name ) assignField((Instance)(ht), &symbol->name, name); else symbol->name = name; }
static __inline void assign_symbol_value(HashTable ht, Symbol symbol, Any value) { if ( ht->refer == NAME_both || ht->refer == NAME_value ) assignField((Instance)(ht), &symbol->value, value); else symbol->value = value; }
static Cell newCell(Chain ch, register Any value) { Cell cell; cell = alloc(sizeof(struct cell)); cell->value = NIL; cell->next = NIL; assignField((Instance) ch, &cell->value, value); return cell; }
static status cloneVector(Vector v, Vector clone) { int n, size = valInt(v->size); clonePceSlots(v, clone); clone->allocated = v->size; clone->elements = alloc(size * sizeof(Any)); for( n=0; n<size; n++ ) { clone->elements[n] = NIL; assignField((Instance) clone, &clone->elements[n], getClone2Object(v->elements[n])); } succeed; }
inline bool assignField(const char *field, const char *value) { return assignField(this, field, value); }
static void freeCell(Chain ch, Cell cell) { assignField((Instance) ch, &cell->value, NIL); unalloc(sizeof(struct cell), cell); }