summaryrefslogtreecommitdiff
path: root/gi/gtype.cpp
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2017-04-10 22:09:53 -0700
committerPhilip Chimento <philip.chimento@gmail.com>2017-04-17 19:58:03 -0700
commit4b8dcca7b2a8c9c3012bea517fff80aefd14af3a (patch)
tree5909eb1911f95e8d072aa41e99eee440800bed4f /gi/gtype.cpp
parent8807af7ac36a9ae5de58b480d6c4ff8946dab01c (diff)
downloadgjs-4b8dcca7b2a8c9c3012bea517fff80aefd14af3a.tar.gz
jsapi-util: Add static function spec to GJS_DEFINE_PROTO
This allows the GJS_DEFINE_PROTO_* family of macros to have a JSFunctionSpec array for functions defined on the constructor, rather than on the prototype: i.e. static functions. We clean up an incongruity in cairo-image-surface.cpp where you had to pass the constructor into gjs_cairo_image_surface_init() in order to get the static functions defined. https://bugzilla.gnome.org/show_bug.cgi?id=614413
Diffstat (limited to 'gi/gtype.cpp')
-rw-r--r--gi/gtype.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/gi/gtype.cpp b/gi/gtype.cpp
index bfd8d2cb..d1d5669e 100644
--- a/gi/gtype.cpp
+++ b/gi/gtype.cpp
@@ -145,6 +145,8 @@ JSFunctionSpec gjs_gtype_proto_funcs[] = {
JS_FS_END
};
+JSFunctionSpec gjs_gtype_static_funcs[] = { JS_FS_END };
+
JSObject *
gjs_gtype_create_gtype_wrapper (JSContext *context,
GType gtype)