remove record.h
This commit is contained in:
parent
18b873f723
commit
665eda1d92
|
@ -264,7 +264,6 @@ int pic_str_hash(pic_state *, struct pic_string *);
|
||||||
#include "picrin/macro.h"
|
#include "picrin/macro.h"
|
||||||
#include "picrin/pair.h"
|
#include "picrin/pair.h"
|
||||||
#include "picrin/port.h"
|
#include "picrin/port.h"
|
||||||
#include "picrin/record.h"
|
|
||||||
#include "picrin/symbol.h"
|
#include "picrin/symbol.h"
|
||||||
|
|
||||||
void *pic_default_allocf(void *, void *, size_t);
|
void *pic_default_allocf(void *, void *, size_t);
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
/**
|
|
||||||
* See Copyright Notice in picrin.h
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef PICRIN_BLOB_H
|
|
||||||
#define PICRIN_BLOB_H
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -122,6 +122,21 @@ struct pic_proc {
|
||||||
struct pic_proc *pic_make_proc(pic_state *, pic_func_t, int, pic_value *);
|
struct pic_proc *pic_make_proc(pic_state *, pic_func_t, int, pic_value *);
|
||||||
struct pic_proc *pic_make_proc_irep(pic_state *, struct pic_irep *, struct pic_context *);
|
struct pic_proc *pic_make_proc_irep(pic_state *, struct pic_irep *, struct pic_context *);
|
||||||
|
|
||||||
|
|
||||||
|
/* record */
|
||||||
|
|
||||||
|
struct pic_record {
|
||||||
|
PIC_OBJECT_HEADER
|
||||||
|
pic_value type;
|
||||||
|
pic_value datum;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define pic_rec_p(pic, v) (pic_type(pic, v) == PIC_TYPE_RECORD)
|
||||||
|
#define pic_rec_ptr(v) ((struct pic_record *)pic_obj_ptr(v))
|
||||||
|
|
||||||
|
struct pic_record *pic_make_rec(pic_state *, pic_value, pic_value);
|
||||||
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
/**
|
|
||||||
* See Copyright Notice in picrin.h
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef PICRIN_RECORD_H
|
|
||||||
#define PICRIN_RECORD_H
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct pic_record {
|
|
||||||
PIC_OBJECT_HEADER
|
|
||||||
pic_value type;
|
|
||||||
pic_value datum;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define pic_rec_p(pic, v) (pic_type(pic, v) == PIC_TYPE_RECORD)
|
|
||||||
#define pic_rec_ptr(v) ((struct pic_record *)pic_obj_ptr(v))
|
|
||||||
|
|
||||||
struct pic_record *pic_make_rec(pic_state *, pic_value, pic_value);
|
|
||||||
|
|
||||||
pic_value pic_rec_type(pic_state *, struct pic_record *);
|
|
||||||
pic_value pic_rec_datum(pic_state *, struct pic_record *);
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,16 +0,0 @@
|
||||||
/**
|
|
||||||
* See Copyright Notice in picrin.h
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef PICRIN_STRING_H
|
|
||||||
#define PICRIN_STRING_H
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -3,6 +3,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "picrin.h"
|
#include "picrin.h"
|
||||||
|
#include "picrin/object.h"
|
||||||
|
|
||||||
struct pic_record *
|
struct pic_record *
|
||||||
pic_make_rec(pic_state *pic, pic_value type, pic_value datum)
|
pic_make_rec(pic_state *pic, pic_value type, pic_value datum)
|
||||||
|
@ -16,18 +17,6 @@ pic_make_rec(pic_state *pic, pic_value type, pic_value datum)
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
pic_value
|
|
||||||
pic_rec_type(pic_state PIC_UNUSED(*pic), struct pic_record *rec)
|
|
||||||
{
|
|
||||||
return rec->type;
|
|
||||||
}
|
|
||||||
|
|
||||||
pic_value
|
|
||||||
pic_rec_datum(pic_state PIC_UNUSED(*pic), struct pic_record *rec)
|
|
||||||
{
|
|
||||||
return rec->datum;
|
|
||||||
}
|
|
||||||
|
|
||||||
static pic_value
|
static pic_value
|
||||||
pic_rec_make_record(pic_state *pic)
|
pic_rec_make_record(pic_state *pic)
|
||||||
{
|
{
|
||||||
|
@ -55,7 +44,7 @@ pic_rec_record_type(pic_state *pic)
|
||||||
|
|
||||||
pic_get_args(pic, "r", &rec);
|
pic_get_args(pic, "r", &rec);
|
||||||
|
|
||||||
return pic_rec_type(pic, rec);
|
return rec->type;
|
||||||
}
|
}
|
||||||
|
|
||||||
static pic_value
|
static pic_value
|
||||||
|
@ -65,7 +54,7 @@ pic_rec_record_datum(pic_state *pic)
|
||||||
|
|
||||||
pic_get_args(pic, "r", &rec);
|
pic_get_args(pic, "r", &rec);
|
||||||
|
|
||||||
return pic_rec_datum(pic, rec);
|
return rec->datum;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue