gwion->env->gwion = gwion;
gwion->vm->bbq->si = new_soundinfo(gwion->mp);
gwion->data = new_gwiondata(gwion->mp);
- gwion->type = (Type*)xmalloc(MAX_TYPE * sizeof(struct Type_*));
+ gwion->type = (Type*)xcalloc(MAX_TYPE, sizeof(struct Type_*));
pass_default(gwion);
arg->si = gwion->vm->bbq->si;
const m_bool ret = arg_parse(gwion, arg);
do {
next = curr->next;
CHECK_OO((curr->type = check_exp_func[curr->exp_type](env, &curr->d)))
-// if(isa(curr->type, env->gwion->type[et_varloop]) > 0 && (prev || next))
-// ERR_O(exp->pos, _("Varloop must be the only expression"))
+ if(env->gwion->type[et_varloop] && isa(curr->type, env->gwion->type[et_varloop]) > 0 && (prev || next))
+ ERR_O(exp->pos, _("Varloop must be the only expression"))
if(env->func && isa(curr->type, env->gwion->type[et_lambda]) < 0 && isa(curr->type, env->gwion->type[et_function]) > 0 &&
!GET_FLAG(curr->type->e->d.func, pure))
UNSET_FLAG(env->func, pure);
#!/bin/bash
-# [test] #19
+# [test] #20
n=0
[ "$1" ] && n="$1"
n=$((n+1))
run "$n" "invalid global func" "examples/complex/invalid_func0.gw examples/complex/invalid_func1.gw" "file"
+# comma in module argument
+n=$((n+1))
+run "$n" "comma in module argument" "-mpp=-Dtest='\"dqs\,qs\"',-Dtsdl" "file"
+
# test signal
./gwion -l1 &
PID=$!