view src/impl/FileRead.cbc @ 109:4f9d95dc4efd

fix createInstance
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Thu, 21 Nov 2019 21:10:25 +0900
parents
children
line wrap: on
line source

#include "../context.h";
#interface "SysRead.h";

// ----
// typedef struct FileRead<Type, Isa> impl SysRead {
//   struct file* f;
// } FileRead;
// ----

SysRead* createFileRead(struct Context* cbc_context) {
    struct SysRead* sys_read  = new SysRead();
    struct FileRead* file_read = new FileRead();
    sys_read->sys_read = (union Data*)file_read;
    file_read->f = NULL;
    sys_read->num = NULL;
    sys_read->read = C_readFileRead;
    sys_read->next = C_nextFileRead;
    return sys_read;
}
__code readFileRead(__code next(...)) {

  goto next(...);
}

__code nextFileRead(...) {

}