pic_get_args supports symbol

This commit is contained in:
Yuichi Nishiwaki 2014-01-09 16:33:38 +09:00
parent bc232acf9f
commit 8e4e226bd3
1 changed files with 17 additions and 0 deletions

View File

@ -186,6 +186,23 @@ pic_get_args(pic_state *pic, const char *format, ...)
} }
} }
break; break;
case 'm':
{
pic_sym *m;
pic_value v;
m = va_arg(ap, pic_sym *);
if (i < argc) {
v = GET_OPERAND(pic,i);
if (pic_symbol_p(v)) {
*m = pic_sym(v);
}
else {
pic_error(pic, "pic_get_args: expected vector");
}
i++;
}
}
case 'v': case 'v':
{ {
struct pic_vector **vec; struct pic_vector **vec;