finished the initial variadic arguments handling work

This commit is contained in:
hyunghwan.chung
2016-12-14 07:18:01 +00:00
parent bcaf4e5e1e
commit 45694df56b
8 changed files with 134 additions and 51 deletions

View File

@ -126,16 +126,17 @@ struct fnctab_t
{
const stix_bch_t* mthname;
const stix_bch_t* pfname;
int variadic;
stix_pfimpl_t handler;
};
static fnctab_t fnctab[] =
{
{ "_newInstSize", STIX_NULL, pf_newinstsize },
{ "close", STIX_NULL, pf_close },
{ "gets", STIX_NULL, pf_gets },
{ "open:for:", STIX_NULL, pf_open },
{ "puts", STIX_NULL, pf_puts }
{ "_newInstSize", STIX_NULL, 0, pf_newinstsize },
{ "close", STIX_NULL, 0, pf_close },
{ "gets", STIX_NULL, 0, pf_gets },
{ "open:for:", STIX_NULL, 0, pf_open },
{ "puts", STIX_NULL, 1, pf_puts }
};
@ -149,9 +150,9 @@ static stix_ooch_t voca_newInstSize[] = { '_','n','e','w','I','n','s','t','S','i
static int import (stix_t* stix, stix_mod_t* mod, stix_oop_t _class)
{
stix_pushtmp (stix, &_class);
stix_genpfmethod (stix, mod, _class, STIX_METHOD_CLASS, voca_newInstSize, STIX_NULL);
stix_genpfmethod (stix, mod, _class, STIX_METHOD_INSTANCE, voca_open_for, STIX_NULL);
stix_genpfmethod (stix, mod, _class, STIX_METHOD_INSTANCE, voca_close, voca_close);
stix_genpfmethod (stix, mod, _class, STIX_METHOD_CLASS, voca_newInstSize, 0, STIX_NULL);
stix_genpfmethod (stix, mod, _class, STIX_METHOD_INSTANCE, voca_open_for, 0, STIX_NULL);
stix_genpfmethod (stix, mod, _class, STIX_METHOD_INSTANCE, voca_close, 0, voca_close);
stix_poptmp (stix);
return 0;
}