+
+void filter_context_prepare(filter_context_t *context, void *qctx)
+{
+ for (int i = 0 ; i < FTK_count ; ++i) {
+ if (ctx_constructors[i] != NULL) {
+ context->contexts[i] = ctx_constructors[i]();
+ }
+ }
+ context->current_filter = NULL;
+ context->data = qctx;
+}
+
+void filter_context_wipe(filter_context_t *context)
+{
+ for (int i = 0 ; i < FTK_count ; ++i) {
+ if (ctx_destructors[i] != NULL) {
+ ctx_destructors[i](context->contexts[i]);
+ }
+ }
+}