remove port.h

This commit is contained in:
Yuichi Nishiwaki 2016-02-19 05:58:34 +09:00
parent 84c2866b2b
commit 5402611323
3 changed files with 13 additions and 27 deletions

View File

@ -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 { \

View File

@ -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

View File

@ -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