/* Symbol table support
Copyright 1998-2005 James Bowman
Copyright 2016 Molnár Károly
*/
#pragma once
struct symbol;
typedef struct symbol symbol_t;
struct symbol_table;
typedef struct symbol_table symbol_table_t;
typedef int (_cdecl*symbol_compare_t)(const void *, const void *);
FUNC(size_t) gp_sym_get_symbol_count(const symbol_table_t *Table);
FUNC(symbol_table_t*) gp_sym_push_table(symbol_table_t *Table, bool Case_insensitive);
FUNC(symbol_table_t*) gp_sym_pop_table(symbol_table_t *Table);
FUNC(void) gp_sym_set_guest_table(symbol_table_t *Table_host, symbol_table_t *Table_guest);
FUNC(symbol_table_t*) gp_sym_get_guest_table(symbol_table_t *Table);
FUNC(symbol_t*) gp_sym_add_symbol(symbol_table_t *Table, const char *Name);
FUNC(bool) gp_sym_remove_symbol_with_index(symbol_table_t *Table, size_t Index);
FUNC(bool) gp_sym_remove_symbol(symbol_table_t *Table, const char *Name);
FUNC(symbol_t*) gp_sym_get_symbol(const symbol_table_t *Table, const char *Name);
FUNC(symbol_t*) gp_sym_get_symbol_len(const symbol_table_t *Table, const char *Name, size_t Len);
FUNC(symbol_t*) gp_sym_get_symbol_with_index(const symbol_table_t *Table, size_t Index);
FUNC(const symbol_t**) gp_sym_clone_symbol_array(const symbol_table_t *Table, symbol_compare_t Cmp);
FUNC(void) gp_sym_annotate_symbol(symbol_t *Sym, void *Value);
FUNC(const char*) gp_sym_get_symbol_name(const symbol_t *Sym);
FUNC(void*) gp_sym_get_symbol_annotation(const symbol_t *Sym);
CFUNC(int) gp_sym_compare_fn(const void *P0, const void *P1);
CFUNC(int) gp_sym_version_compare_fn(const void *P0, const void *P1);
Vorgefundene Kodierung: UTF-8 | 0
|