From d28ceb85a6b43a503c608116798945baab0e060f Mon Sep 17 00:00:00 2001
From: Vito Caputo <vcaputo@pengaru.com>
Date: Sat, 22 Apr 2017 15:29:49 -0700
Subject: *: add module context machinery

introduces create_context() and destroy_context() methods, and adds a
'void *context' first parameter to the module methods.

If a module doesn't supply create_context() then NULL is simply passed
around as the context, so trivial modules can continue to only implement
render_fragment().

A subsequent commit will update the modules to encapsulate their global
state in module-specific contexts.
---
 src/modules/stars/stars.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/modules/stars')

diff --git a/src/modules/stars/stars.c b/src/modules/stars/stars.c
index f624a62..3712e33 100644
--- a/src/modules/stars/stars.c
+++ b/src/modules/stars/stars.c
@@ -13,7 +13,7 @@
 
 /* Copyright (C) 2017 Philip J. Freeman <elektron@halo.nu> */
 
-static void stars_render_fragment(fb_fragment_t *fragment)
+static void stars_render_fragment(void *context, fb_fragment_t *fragment)
 {
 	static int	initialized, z;
 	static struct	universe* u;
-- 
cgit v1.2.3