pic_sym is not a pointer
This commit is contained in:
@@ -23,14 +23,14 @@ struct pic_dict *pic_make_dict(pic_state *);
|
||||
pic_dict_for_each_helper_((sym), PIC_GENSYM(tmp), (dict))
|
||||
#define pic_dict_for_each_helper_(var, tmp, dict) \
|
||||
for (xh_entry *tmp = xh_begin(&dict->hash); \
|
||||
(tmp && ((var = xh_key(tmp, pic_sym)), 1)); \
|
||||
(tmp && ((var = xh_key(tmp, pic_sym *)), 1)); \
|
||||
tmp = xh_next(tmp))
|
||||
|
||||
pic_value pic_dict_ref(pic_state *, struct pic_dict *, pic_sym);
|
||||
void pic_dict_set(pic_state *, struct pic_dict *, pic_sym, pic_value);
|
||||
void pic_dict_del(pic_state *, struct pic_dict *, pic_sym);
|
||||
pic_value pic_dict_ref(pic_state *, struct pic_dict *, pic_sym *);
|
||||
void pic_dict_set(pic_state *, struct pic_dict *, pic_sym *, pic_value);
|
||||
void pic_dict_del(pic_state *, struct pic_dict *, pic_sym *);
|
||||
size_t pic_dict_size(pic_state *, struct pic_dict *);
|
||||
bool pic_dict_has(pic_state *, struct pic_dict *, pic_sym);
|
||||
bool pic_dict_has(pic_state *, struct pic_dict *, pic_sym *);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ extern "C" {
|
||||
|
||||
struct pic_error {
|
||||
PIC_OBJECT_HEADER
|
||||
pic_sym type;
|
||||
pic_sym *type;
|
||||
pic_str *msg;
|
||||
pic_value irrs;
|
||||
pic_str *stack;
|
||||
@@ -22,7 +22,7 @@ struct pic_error {
|
||||
#define pic_error_p(v) (pic_type(v) == PIC_TT_ERROR)
|
||||
#define pic_error_ptr(v) ((struct pic_error *)pic_ptr(v))
|
||||
|
||||
struct pic_error *pic_make_error(pic_state *, pic_sym, const char *, pic_list);
|
||||
struct pic_error *pic_make_error(pic_state *, pic_sym *, const char *, pic_list);
|
||||
|
||||
/* do not return from try block! */
|
||||
|
||||
@@ -44,7 +44,7 @@ void pic_pop_try(pic_state *);
|
||||
|
||||
pic_value pic_raise_continuable(pic_state *, pic_value);
|
||||
pic_noreturn void pic_raise(pic_state *, pic_value);
|
||||
pic_noreturn void pic_throw(pic_state *, pic_sym, const char *, pic_list);
|
||||
pic_noreturn void pic_throw(pic_state *, pic_sym *, const char *, pic_list);
|
||||
pic_noreturn void pic_error(pic_state *, const char *, pic_list);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
||||
@@ -62,13 +62,13 @@ struct pic_code {
|
||||
|
||||
struct pic_irep {
|
||||
PIC_OBJECT_HEADER
|
||||
pic_sym name;
|
||||
pic_sym *name;
|
||||
pic_code *code;
|
||||
int argc, localc, capturec;
|
||||
bool varg;
|
||||
struct pic_irep **irep;
|
||||
pic_value *pool;
|
||||
pic_sym *syms;
|
||||
pic_sym **syms;
|
||||
size_t clen, ilen, plen, slen;
|
||||
};
|
||||
|
||||
|
||||
@@ -22,15 +22,15 @@ struct pic_senv {
|
||||
struct pic_senv *pic_null_syntactic_environment(pic_state *);
|
||||
|
||||
bool pic_identifier_p(pic_state *pic, pic_value obj);
|
||||
bool pic_identifier_eq_p(pic_state *, struct pic_senv *, pic_sym, struct pic_senv *, pic_sym);
|
||||
bool pic_identifier_eq_p(pic_state *, struct pic_senv *, pic_sym *, struct pic_senv *, pic_sym *);
|
||||
|
||||
struct pic_senv *pic_make_senv(pic_state *, struct pic_senv *);
|
||||
|
||||
pic_sym pic_add_rename(pic_state *, struct pic_senv *, pic_sym);
|
||||
bool pic_find_rename(pic_state *, struct pic_senv *, pic_sym, pic_sym * /* = NULL */);
|
||||
void pic_put_rename(pic_state *, struct pic_senv *, pic_sym, pic_sym);
|
||||
pic_sym *pic_add_rename(pic_state *, struct pic_senv *, pic_sym *);
|
||||
bool pic_find_rename(pic_state *, struct pic_senv *, pic_sym *, pic_sym ** /* = NULL */);
|
||||
void pic_put_rename(pic_state *, struct pic_senv *, pic_sym *, pic_sym *);
|
||||
|
||||
void pic_define_syntactic_keyword(pic_state *, struct pic_senv *, pic_sym, pic_sym);
|
||||
void pic_define_syntactic_keyword(pic_state *, struct pic_senv *, pic_sym *, pic_sym *);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ extern "C" {
|
||||
/* native C function */
|
||||
struct pic_func {
|
||||
pic_func_t f;
|
||||
pic_sym name;
|
||||
pic_sym *name;
|
||||
};
|
||||
|
||||
struct pic_env {
|
||||
@@ -48,7 +48,7 @@ struct pic_proc {
|
||||
struct pic_proc *pic_make_proc(pic_state *, pic_func_t, const char *);
|
||||
struct pic_proc *pic_make_proc_irep(pic_state *, struct pic_irep *, struct pic_env *);
|
||||
|
||||
pic_sym pic_proc_name(struct pic_proc *);
|
||||
pic_sym *pic_proc_name(struct pic_proc *);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ struct pic_record {
|
||||
struct pic_record *pic_make_record(pic_state *, pic_value);
|
||||
|
||||
pic_value pic_record_type(pic_state *, struct pic_record *);
|
||||
pic_value pic_record_ref(pic_state *, struct pic_record *, pic_sym);
|
||||
void pic_record_set(pic_state *, struct pic_record *, pic_sym, pic_value);
|
||||
pic_value pic_record_ref(pic_state *, struct pic_record *, pic_sym *);
|
||||
void pic_record_set(pic_state *, struct pic_record *, pic_sym *, pic_value);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ struct pic_error;
|
||||
|
||||
/* set aliases to basic types */
|
||||
typedef pic_value pic_list;
|
||||
typedef struct pic_symbol *pic_sym;
|
||||
typedef struct pic_symbol pic_sym;
|
||||
typedef struct pic_pair pic_pair;
|
||||
typedef struct pic_string pic_str;
|
||||
typedef struct pic_vector pic_vec;
|
||||
|
||||
Reference in New Issue
Block a user