From 64d74dbb5c755c81dc983bf7940ebd72e53889c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Vavru=C5=A1a?= <marek.vavrusa@nic.cz> Date: Thu, 7 May 2015 01:28:51 +0200 Subject: [PATCH] libknot/processing: layer api can now have data (owner) cherry pick from the libknot cleanup wip, this is going to be used much more in the future for storing layer module owners both in auth and resolver + for modules with ffi --- src/libknot/processing/layer.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/libknot/processing/layer.h b/src/libknot/processing/layer.h index 15416a8626..4ec7d90fcb 100644 --- a/src/libknot/processing/layer.h +++ b/src/libknot/processing/layer.h @@ -51,12 +51,9 @@ struct knot_layer_api; typedef struct knot_layer { node_t node; - uint16_t state; /* Bitmap of enum knot_layer_state. */ mm_ctx_t *mm; /* Processing memory context. */ - - /* Module specific. */ - void *data; + void *data; /* Module specific. */ const struct knot_layer_api *api; } knot_layer_t; @@ -68,6 +65,7 @@ typedef struct knot_layer_api { int (*consume)(knot_layer_t *ctx, knot_pkt_t *pkt); int (*produce)(knot_layer_t *ctx, knot_pkt_t *pkt); int (*fail)(knot_layer_t *ctx, knot_pkt_t *pkt); + void *data; } knot_layer_api_t; /*! -- GitLab