#include "../../../context.h" #include #impl "Hello.h" as "HelloImpl.h" #interface "Hello.h" // ---- // typedef struct HelloImpl <> impl Hello { // char* hString; // char* wString; // } HelloImpl; // ---- Hello* createHelloImpl(struct Context* context) { struct Hello* hello = new Hello(); struct HelloImpl* hello_impl = new HelloImpl(); hello->hello = (union Data*)hello_impl; hello->string = NULL; hello_impl->hString = NULL; hello_impl->wString = NULL; hello->h = C_hHelloImpl; hello->w = C_wHelloImpl; return hello; } __code h(struct HelloImpl* hello, __code next(...)) { hello->hString = "Hello, "; //createImpl部分では_implなのだが動く printf("%s", hello->hString); goto w(hello, next); } __code w(struct HelloImpl* hello, __code next(...)) { hello->wString = "World.\n"; printf("%s", hello->wString); goto next(...); }