diff options
author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2021-05-06 19:06:23 +0200 |
---|---|---|
committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2021-05-13 13:17:16 +0200 |
commit | 4703b56bedfde9ecfde663fa42d344c820e854ec (patch) | |
tree | 68a1900c4b3dd0e4340e75cbbf7eee4739dbe52d /modules/cairo-surface.cpp | |
parent | d87e961861cc6ec934c300bca7f9528bd21aba61 (diff) | |
download | gjs-4703b56bedfde9ecfde663fa42d344c820e854ec.tar.gz |
gjs: Ensure that we always use unique names for static values and types
This is a prepartory work to get the unity builds possible
Diffstat (limited to 'modules/cairo-surface.cpp')
-rw-r--r-- | modules/cairo-surface.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/modules/cairo-surface.cpp b/modules/cairo-surface.cpp index 2818adf0..287598e4 100644 --- a/modules/cairo-surface.cpp +++ b/modules/cairo-surface.cpp @@ -62,11 +62,8 @@ writeToPNG_func(JSContext *context, } GJS_JSAPI_RETURN_CONVENTION -static bool -getType_func(JSContext *context, - unsigned argc, - JS::Value *vp) -{ +bool CairoSurface::getType_func(JSContext* context, unsigned argc, + JS::Value* vp) { GJS_GET_THIS(context, argc, vp, rec, obj); cairo_surface_type_t type; @@ -230,12 +227,9 @@ static bool surface_release_argument(JSContext*, GITransfer transfer, return true; } -static GjsForeignInfo foreign_info = { - surface_to_g_argument, - surface_from_g_argument, - surface_release_argument -}; - void gjs_cairo_surface_init(void) { + static GjsForeignInfo foreign_info = {surface_to_g_argument, + surface_from_g_argument, + surface_release_argument}; gjs_struct_foreign_register("cairo", "Surface", &foreign_info); } |