slang_info_log_memory(C->L);
return 0;
}
- if (!slang_variable_construct(var))
- return 0;
if (!parse_struct_field_var(C, &o, var, sp))
return 0;
}
slang_info_log_memory(C->L);
return 0;
}
- if (!slang_variable_construct(p))
- return 0;
if (!parse_parameter_declaration(C, O, p))
return 0;
}
slang_info_log_memory(C->L);
return 0;
}
- if (!slang_variable_construct(var))
- return 0;
/* copy the declarator qualifier type, parse the identifier */
var->global = C->global_scope;
/**
* Grow the variable list by one.
- * \return pointer to space for the new variable.
+ * \return pointer to space for the new variable (will be initialized)
*/
slang_variable *
slang_variable_scope_grow(slang_variable_scope *scope)
(n + 1) * sizeof(slang_variable));
if (!scope->variables)
return NULL;
+
scope->num_variables++;
+
+ if (!slang_variable_construct(scope->variables + n))
+ return NULL;
+
return scope->variables + n;
}