initial bytevector support
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#ifndef BLOB_H__
|
||||
#define BLOB_H__
|
||||
|
||||
struct pic_blob {
|
||||
PIC_OBJECT_HEADER
|
||||
char *data;
|
||||
int len;
|
||||
};
|
||||
|
||||
#define pic_blob_p(v) (pic_type(v) == PIC_TT_BLOB)
|
||||
#define pic_blob_ptr(v) ((struct pic_blob *)(v).u.data)
|
||||
|
||||
struct pic_blob *pic_blob_new(pic_state *, char *, int len);
|
||||
|
||||
#endif
|
||||
@@ -41,6 +41,7 @@ enum pic_tt {
|
||||
PIC_TT_PAIR,
|
||||
PIC_TT_STRING,
|
||||
PIC_TT_VECTOR,
|
||||
PIC_TT_BLOB,
|
||||
PIC_TT_PROC,
|
||||
PIC_TT_PORT,
|
||||
PIC_TT_ENV
|
||||
@@ -73,6 +74,7 @@ struct pic_vector {
|
||||
|
||||
struct pic_proc;
|
||||
struct pic_port;
|
||||
struct pic_blob;
|
||||
|
||||
#define pic_obj_ptr(o) ((struct pic_object *)(o).u.data)
|
||||
#define pic_pair_ptr(o) ((struct pic_pair *)(o).u.data)
|
||||
|
||||
Reference in New Issue
Block a user