Previous: , Up: objects symbols   [Index]


13.12.2 Operations with the C language API

Symbol objects are allocated on the heap and must be interned, that is registered in a global symbol table.

Preprocessor Symbol: symbol_mask
Preprocessor Symbol: symbol_tag

Integer values used to tag and recognise the first word in symbol memory blocks. symbol_mask isolates the tag bits from an ikptr_t and symbol_tag represents the tag bits.

Preprocessor Symbol: symbol_record_size

Number of bytes needed to hold a symbol memory block.

Preprocessor Symbol: disp_symbol_record_tag
Preprocessor Symbol: disp_symbol_record_string
Preprocessor Symbol: disp_symbol_record_ustring
Preprocessor Symbol: disp_symbol_record_value
Preprocessor Symbol: disp_symbol_record_proc
Preprocessor Symbol: disp_symbol_record_plist

Symbol field displacements. The number of bytes to add to an untagged pointer to symbol to get the pointer to the first byte in the word holding the specified field.

Preprocessor Symbol: off_symbol_record_tag
Preprocessor Symbol: off_symbol_record_string
Preprocessor Symbol: off_symbol_record_ustring
Preprocessor Symbol: off_symbol_record_value
Preprocessor Symbol: off_symbol_record_proc
Preprocessor Symbol: off_symbol_record_plist

Symbol field offsets. The number of bytes to add to an tagged pointer to symbol to get the pointer to the first byte in the word holding the specified field.

Operations on symbols

Function: int ik_is_symbol (ikptr_t obj)

Return true if obj is a symbol.

Function: ikptr_t iku_symbol_from_string (ikpcb_t * pcb, ikptr_t str)

Return a Scheme symbol object whose name is the Scheme string str. This function is the same as iku_string_to_symbol().