remove port.h
This commit is contained in:
parent
84c2866b2b
commit
5402611323
|
@ -272,7 +272,6 @@ int pic_str_hash(pic_state *, struct pic_string *);
|
|||
|
||||
#include "picrin/cont.h"
|
||||
#include "picrin/macro.h"
|
||||
#include "picrin/port.h"
|
||||
|
||||
void *pic_default_allocf(void *, void *, size_t);
|
||||
|
||||
|
@ -283,6 +282,9 @@ void *pic_default_allocf(void *, void *, size_t);
|
|||
|
||||
struct pic_object *pic_obj_alloc(pic_state *, size_t, int type);
|
||||
|
||||
struct pic_port *pic_make_port(pic_state *, xFILE *file);
|
||||
void pic_close_port(pic_state *, struct pic_port *port);
|
||||
|
||||
#define pic_void(exec) \
|
||||
pic_void_(PIC_GENSYM(ai), exec)
|
||||
#define pic_void_(ai,exec) do { \
|
||||
|
|
|
@ -190,6 +190,16 @@ struct pic_error {
|
|||
struct pic_error *pic_make_error(pic_state *, const char *, const char *, pic_value);
|
||||
|
||||
|
||||
/* port */
|
||||
|
||||
struct pic_port {
|
||||
PIC_OBJECT_HEADER
|
||||
xFILE *file;
|
||||
};
|
||||
|
||||
#define pic_port_ptr(v) ((struct pic_port *)pic_obj_ptr(v))
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
/**
|
||||
* See Copyright Notice in picrin.h
|
||||
*/
|
||||
|
||||
#ifndef PICRIN_PORT_H
|
||||
#define PICRIN_PORT_H
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct pic_port {
|
||||
PIC_OBJECT_HEADER
|
||||
xFILE *file;
|
||||
};
|
||||
|
||||
#define pic_port_ptr(v) ((struct pic_port *)pic_obj_ptr(v))
|
||||
|
||||
struct pic_port *pic_make_port(pic_state *, xFILE *file);
|
||||
void pic_close_port(pic_state *, struct pic_port *port);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue