summaryrefslogtreecommitdiff
path: root/modules/cairo.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/cairo.c')
-rw-r--r--modules/cairo.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/cairo.c b/modules/cairo.c
index d72e39c4..05651692 100644
--- a/modules/cairo.c
+++ b/modules/cairo.c
@@ -45,11 +45,14 @@ gjs_cairo_check_status(JSContext *context,
JSBool
gjs_js_define_cairo_stuff(JSContext *context,
- JSObject *module)
+ JSObject **module_out)
{
jsval obj;
+ JSObject *module;
JSObject *surface_proto, *pattern_proto, *gradient_proto;
+ module = JS_NewObject (context, NULL, NULL, NULL);
+
obj = gjs_cairo_context_create_proto(context, module,
"Context", NULL);
if (JSVAL_IS_NULL(obj))
@@ -122,5 +125,7 @@ gjs_js_define_cairo_stuff(JSContext *context,
if (JSVAL_IS_NULL(obj))
return JS_FALSE;
+ *module_out = module;
+
return JS_TRUE;
}