glsl: added slang_operation_free_children()

This commit is contained in:
Brian Paul 2009-06-24 16:04:33 -06:00
parent e5b53c071b
commit 5951ab311d
2 changed files with 17 additions and 0 deletions

View file

@ -200,6 +200,20 @@ slang_operation_delete(slang_operation *oper)
}
void
slang_operation_free_children(slang_operation *oper)
{
GLuint i;
for (i = 0; i < slang_oper_num_children(oper); i++) {
slang_operation *child = slang_oper_child(oper, i);
slang_operation_destruct(child);
}
_slang_free(oper->children);
oper->children = NULL;
oper->num_children = 0;
}
slang_operation *
slang_operation_grow(GLuint *numChildren, slang_operation **children)
{

View file

@ -150,6 +150,9 @@ slang_operation_new(GLuint count);
extern void
slang_operation_delete(slang_operation *oper);
extern void
slang_operation_free_children(slang_operation *oper);
extern slang_operation *
slang_operation_grow(GLuint *numChildren, slang_operation **children);