summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gi/boxed.cpp5
-rw-r--r--gi/fundamental.cpp5
-rw-r--r--gi/gerror.cpp10
-rw-r--r--gi/gtype.cpp5
-rw-r--r--gi/object.cpp10
-rw-r--r--gi/private.cpp8
-rw-r--r--gi/union.cpp5
-rw-r--r--gjs/byteArray.cpp16
-rw-r--r--gjs/debugger.cpp4
-rw-r--r--gjs/global.cpp11
-rw-r--r--gjs/importer.cpp5
-rw-r--r--modules/cairo-context.cpp161
-rw-r--r--modules/cairo-gradient.cpp7
-rw-r--r--modules/cairo-image-surface.cpp18
-rw-r--r--modules/cairo-pattern.cpp5
-rw-r--r--modules/cairo-region.cpp27
-rw-r--r--modules/cairo-solid-pattern.cpp7
-rw-r--r--modules/cairo-surface-pattern.cpp11
-rw-r--r--modules/cairo-surface.cpp7
-rw-r--r--modules/system.cpp17
-rw-r--r--test/gjs-test-call-args.cpp59
21 files changed, 191 insertions, 212 deletions
diff --git a/gi/boxed.cpp b/gi/boxed.cpp
index bdd8455e..db30f5a2 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -886,9 +886,8 @@ JSPropertySpec gjs_boxed_proto_props[] = {
};
JSFunctionSpec gjs_boxed_proto_funcs[] = {
- JS_FS("toString", to_string_func, 0, 0),
- JS_FS_END
-};
+ JS_FN("toString", to_string_func, 0, 0),
+ JS_FS_END};
static bool
type_can_be_allocated_directly(GITypeInfo *type_info)
diff --git a/gi/fundamental.cpp b/gi/fundamental.cpp
index e3475aa1..01445f60 100644
--- a/gi/fundamental.cpp
+++ b/gi/fundamental.cpp
@@ -570,9 +570,8 @@ static JSPropertySpec gjs_fundamental_instance_proto_props[] = {
};
static JSFunctionSpec gjs_fundamental_instance_proto_funcs[] = {
- JS_FS("toString", to_string_func, 0, 0),
- JS_FS_END
-};
+ JS_FN("toString", to_string_func, 0, 0),
+ JS_FS_END};
static JSObject *
gjs_lookup_fundamental_prototype(JSContext *context,
diff --git a/gi/gerror.cpp b/gi/gerror.cpp
index 3ceb1928..a5d2919c 100644
--- a/gi/gerror.cpp
+++ b/gi/gerror.cpp
@@ -281,14 +281,12 @@ JSPropertySpec gjs_error_proto_props[] = {
};
JSFunctionSpec gjs_error_proto_funcs[] = {
- JS_FS("toString", error_to_string, 0, GJS_MODULE_PROP_FLAGS),
- JS_FS_END
-};
+ JS_FN("toString", error_to_string, 0, GJS_MODULE_PROP_FLAGS),
+ JS_FS_END};
static JSFunctionSpec gjs_error_constructor_funcs[] = {
- JS_FS("valueOf", error_constructor_value_of, 0, GJS_MODULE_PROP_FLAGS),
- JS_FS_END
-};
+ JS_FN("valueOf", error_constructor_value_of, 0, GJS_MODULE_PROP_FLAGS),
+ JS_FS_END};
void
gjs_define_error_class(JSContext *context,
diff --git a/gi/gtype.cpp b/gi/gtype.cpp
index 314f4b28..64bd8a81 100644
--- a/gi/gtype.cpp
+++ b/gi/gtype.cpp
@@ -145,9 +145,8 @@ JSPropertySpec gjs_gtype_proto_props[] = {
/* Functions */
JSFunctionSpec gjs_gtype_proto_funcs[] = {
- JS_FS("toString", to_string_func, 0, 0),
- JS_FS_END
-};
+ JS_FN("toString", to_string_func, 0, 0),
+ JS_FS_END};
JSFunctionSpec gjs_gtype_static_funcs[] = { JS_FS_END };
diff --git a/gi/object.cpp b/gi/object.cpp
index 5c82fa92..ab8d1dc9 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -1977,11 +1977,11 @@ JSPropertySpec gjs_object_instance_proto_props[] = {
};
JSFunctionSpec gjs_object_instance_proto_funcs[] = {
- JS_FS("_init", &ObjectBase::init, 0, 0),
- JS_FS("connect", &ObjectBase::connect, 0, 0),
- JS_FS("connect_after", &ObjectBase::connect_after, 0, 0),
- JS_FS("emit", &ObjectBase::emit, 0, 0),
- JS_FS("toString", &ObjectBase::to_string, 0, 0),
+ JS_FN("_init", &ObjectBase::init, 0, 0),
+ JS_FN("connect", &ObjectBase::connect, 0, 0),
+ JS_FN("connect_after", &ObjectBase::connect_after, 0, 0),
+ JS_FN("emit", &ObjectBase::emit, 0, 0),
+ JS_FN("toString", &ObjectBase::to_string, 0, 0),
JS_FS_END};
bool
diff --git a/gi/private.cpp b/gi/private.cpp
index 1dc32911..f8072182 100644
--- a/gi/private.cpp
+++ b/gi/private.cpp
@@ -393,11 +393,11 @@ static bool hook_up_vfunc_symbol_getter(JSContext* cx, unsigned argc,
}
static JSFunctionSpec module_funcs[] = {
- JS_FS("override_property", gjs_override_property, 2, GJS_MODULE_PROP_FLAGS),
- JS_FS("register_interface", gjs_register_interface, 3,
+ JS_FN("override_property", gjs_override_property, 2, GJS_MODULE_PROP_FLAGS),
+ JS_FN("register_interface", gjs_register_interface, 3,
GJS_MODULE_PROP_FLAGS),
- JS_FS("register_type", gjs_register_type, 4, GJS_MODULE_PROP_FLAGS),
- JS_FS("signal_new", gjs_signal_new, 6, GJS_MODULE_PROP_FLAGS),
+ JS_FN("register_type", gjs_register_type, 4, GJS_MODULE_PROP_FLAGS),
+ JS_FN("signal_new", gjs_signal_new, 6, GJS_MODULE_PROP_FLAGS),
JS_FS_END,
};
diff --git a/gi/union.cpp b/gi/union.cpp
index 9ed83015..b400cc71 100644
--- a/gi/union.cpp
+++ b/gi/union.cpp
@@ -307,9 +307,8 @@ JSPropertySpec gjs_union_proto_props[] = {
};
JSFunctionSpec gjs_union_proto_funcs[] = {
- JS_FS("toString", to_string_func, 0, 0),
- JS_FS_END
-};
+ JS_FN("toString", to_string_func, 0, 0),
+ JS_FS_END};
bool
gjs_define_union_class(JSContext *context,
diff --git a/gjs/byteArray.cpp b/gjs/byteArray.cpp
index 930850fc..59f55dfc 100644
--- a/gjs/byteArray.cpp
+++ b/gjs/byteArray.cpp
@@ -809,19 +809,17 @@ static JSPropertySpec gjs_byte_array_proto_props[] = {
};
static JSFunctionSpec gjs_byte_array_proto_funcs[] = {
- JS_FS("toString", to_string_func, 0, 0),
- JS_FS("toGBytes", to_gbytes_func, 0, 0),
- JS_FS_END
-};
+ JS_FN("toString", to_string_func, 0, 0),
+ JS_FN("toGBytes", to_gbytes_func, 0, 0),
+ JS_FS_END};
static JSFunctionSpec *gjs_byte_array_static_funcs = nullptr;
static JSFunctionSpec gjs_byte_array_module_funcs[] = {
- JS_FS("fromString", from_string_func, 1, 0),
- JS_FS("fromArray", from_array_func, 1, 0),
- JS_FS("fromGBytes", from_gbytes_func, 1, 0),
- JS_FS_END
-};
+ JS_FN("fromString", from_string_func, 1, 0),
+ JS_FN("fromArray", from_array_func, 1, 0),
+ JS_FN("fromGBytes", from_gbytes_func, 1, 0),
+ JS_FS_END};
GJS_DEFINE_PROTO_FUNCS(byte_array)
diff --git a/gjs/debugger.cpp b/gjs/debugger.cpp
index d54c5b70..84530ae7 100644
--- a/gjs/debugger.cpp
+++ b/gjs/debugger.cpp
@@ -101,8 +101,8 @@ static bool do_readline(JSContext* cx, unsigned argc, JS::Value* vp) {
// clang-format off
static JSFunctionSpec debugger_funcs[] = {
- JS_FS("quit", quit, 1, GJS_MODULE_PROP_FLAGS),
- JS_FS("readline", do_readline, 1, GJS_MODULE_PROP_FLAGS),
+ JS_FN("quit", quit, 1, GJS_MODULE_PROP_FLAGS),
+ JS_FN("readline", do_readline, 1, GJS_MODULE_PROP_FLAGS),
JS_FS_END
};
// clang-format on
diff --git a/gjs/global.cpp b/gjs/global.cpp
index e6d25b2c..3c01f0b6 100644
--- a/gjs/global.cpp
+++ b/gjs/global.cpp
@@ -228,12 +228,11 @@ class GjsGlobal {
};
static constexpr JSFunctionSpec static_funcs[] = {
- JS_FS("log", gjs_log, 1, GJS_MODULE_PROP_FLAGS),
- JS_FS("logError", gjs_log_error, 2, GJS_MODULE_PROP_FLAGS),
- JS_FS("print", gjs_print, 0, GJS_MODULE_PROP_FLAGS),
- JS_FS("printerr", gjs_printerr, 0, GJS_MODULE_PROP_FLAGS),
- JS_FS_END
- };
+ JS_FN("log", gjs_log, 1, GJS_MODULE_PROP_FLAGS),
+ JS_FN("logError", gjs_log_error, 2, GJS_MODULE_PROP_FLAGS),
+ JS_FN("print", gjs_print, 0, GJS_MODULE_PROP_FLAGS),
+ JS_FN("printerr", gjs_printerr, 0, GJS_MODULE_PROP_FLAGS),
+ JS_FS_END};
public:
diff --git a/gjs/importer.cpp b/gjs/importer.cpp
index 23b38d39..2c9d2d18 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -817,9 +817,8 @@ static JSPropertySpec *gjs_importer_proto_props = nullptr;
static JSFunctionSpec *gjs_importer_static_funcs = nullptr;
JSFunctionSpec gjs_importer_proto_funcs[] = {
- JS_FS("toString", importer_to_string, 0, 0),
- JS_FS_END
-};
+ JS_FN("toString", importer_to_string, 0, 0),
+ JS_FS_END};
GJS_DEFINE_PROTO_FUNCS(importer)
diff --git a/modules/cairo-context.cpp b/modules/cairo-context.cpp
index e77bde16..8cf30e7b 100644
--- a/modules/cairo-context.cpp
+++ b/modules/cairo-context.cpp
@@ -823,106 +823,105 @@ getGroupTarget_func(JSContext *context,
}
JSFunctionSpec gjs_cairo_context_proto_funcs[] = {
- JS_FS("$dispose", dispose_func, 0, 0),
- JS_FS("appendPath", appendPath_func, 0, 0),
- JS_FS("arc", arc_func, 0, 0),
- JS_FS("arcNegative", arcNegative_func, 0, 0),
- JS_FS("clip", clip_func, 0, 0),
- JS_FS("clipExtents", clipExtents_func, 0, 0),
- JS_FS("clipPreserve", clipPreserve_func, 0, 0),
- JS_FS("closePath", closePath_func, 0, 0),
- JS_FS("copyPage", copyPage_func, 0, 0),
- JS_FS("copyPath", copyPath_func, 0, 0),
- JS_FS("copyPathFlat", copyPathFlat_func, 0, 0),
- JS_FS("curveTo", curveTo_func, 0, 0),
- JS_FS("deviceToUser", deviceToUser_func, 0, 0),
- JS_FS("deviceToUserDistance", deviceToUserDistance_func, 0, 0),
- JS_FS("fill", fill_func, 0, 0),
- JS_FS("fillPreserve", fillPreserve_func, 0, 0),
- JS_FS("fillExtents", fillExtents_func, 0, 0),
+ JS_FN("$dispose", dispose_func, 0, 0),
+ JS_FN("appendPath", appendPath_func, 0, 0),
+ JS_FN("arc", arc_func, 0, 0),
+ JS_FN("arcNegative", arcNegative_func, 0, 0),
+ JS_FN("clip", clip_func, 0, 0),
+ JS_FN("clipExtents", clipExtents_func, 0, 0),
+ JS_FN("clipPreserve", clipPreserve_func, 0, 0),
+ JS_FN("closePath", closePath_func, 0, 0),
+ JS_FN("copyPage", copyPage_func, 0, 0),
+ JS_FN("copyPath", copyPath_func, 0, 0),
+ JS_FN("copyPathFlat", copyPathFlat_func, 0, 0),
+ JS_FN("curveTo", curveTo_func, 0, 0),
+ JS_FN("deviceToUser", deviceToUser_func, 0, 0),
+ JS_FN("deviceToUserDistance", deviceToUserDistance_func, 0, 0),
+ JS_FN("fill", fill_func, 0, 0),
+ JS_FN("fillPreserve", fillPreserve_func, 0, 0),
+ JS_FN("fillExtents", fillExtents_func, 0, 0),
// fontExtents
- JS_FS("getAntialias", getAntialias_func, 0, 0),
- JS_FS("getCurrentPoint", getCurrentPoint_func, 0, 0),
+ JS_FN("getAntialias", getAntialias_func, 0, 0),
+ JS_FN("getCurrentPoint", getCurrentPoint_func, 0, 0),
// getDash
- JS_FS("getDashCount", getDashCount_func, 0, 0),
- JS_FS("getFillRule", getFillRule_func, 0, 0),
+ JS_FN("getDashCount", getDashCount_func, 0, 0),
+ JS_FN("getFillRule", getFillRule_func, 0, 0),
// getFontFace
// getFontMatrix
// getFontOptions
- JS_FS("getGroupTarget", getGroupTarget_func, 0, 0),
- JS_FS("getLineCap", getLineCap_func, 0, 0),
- JS_FS("getLineJoin", getLineJoin_func, 0, 0),
- JS_FS("getLineWidth", getLineWidth_func, 0, 0),
+ JS_FN("getGroupTarget", getGroupTarget_func, 0, 0),
+ JS_FN("getLineCap", getLineCap_func, 0, 0),
+ JS_FN("getLineJoin", getLineJoin_func, 0, 0),
+ JS_FN("getLineWidth", getLineWidth_func, 0, 0),
// getMatrix
- JS_FS("getMiterLimit", getMiterLimit_func, 0, 0),
- JS_FS("getOperator", getOperator_func, 0, 0),
+ JS_FN("getMiterLimit", getMiterLimit_func, 0, 0),
+ JS_FN("getOperator", getOperator_func, 0, 0),
// getScaledFont
- JS_FS("getSource", getSource_func, 0, 0),
- JS_FS("getTarget", getTarget_func, 0, 0),
- JS_FS("getTolerance", getTolerance_func, 0, 0),
+ JS_FN("getSource", getSource_func, 0, 0),
+ JS_FN("getTarget", getTarget_func, 0, 0),
+ JS_FN("getTolerance", getTolerance_func, 0, 0),
// glyphPath
// glyphExtents
- JS_FS("hasCurrentPoint", hasCurrentPoint_func, 0, 0),
- JS_FS("identityMatrix", identityMatrix_func, 0, 0),
- JS_FS("inFill", inFill_func, 0, 0),
- JS_FS("inStroke", inStroke_func, 0, 0),
- JS_FS("lineTo", lineTo_func, 0, 0),
- JS_FS("mask", mask_func, 0, 0),
- JS_FS("maskSurface", maskSurface_func, 0, 0),
- JS_FS("moveTo", moveTo_func, 0, 0),
- JS_FS("newPath", newPath_func, 0, 0),
- JS_FS("newSubPath", newSubPath_func, 0, 0),
- JS_FS("paint", paint_func, 0, 0),
- JS_FS("paintWithAlpha", paintWithAlpha_func, 0, 0),
- JS_FS("pathExtents", pathExtents_func, 0, 0),
- JS_FS("popGroup", popGroup_func, 0, 0),
- JS_FS("popGroupToSource", popGroupToSource_func, 0, 0),
- JS_FS("pushGroup", pushGroup_func, 0, 0),
- JS_FS("pushGroupWithContent", pushGroupWithContent_func, 0, 0),
- JS_FS("rectangle", rectangle_func, 0, 0),
- JS_FS("relCurveTo", relCurveTo_func, 0, 0),
- JS_FS("relLineTo", relLineTo_func, 0, 0),
- JS_FS("relMoveTo", relMoveTo_func, 0, 0),
- JS_FS("resetClip", resetClip_func, 0, 0),
- JS_FS("restore", restore_func, 0, 0),
- JS_FS("rotate", rotate_func, 0, 0),
- JS_FS("save", save_func, 0, 0),
- JS_FS("scale", scale_func, 0, 0),
- JS_FS("selectFontFace", selectFontFace_func, 0, 0),
- JS_FS("setAntialias", setAntialias_func, 0, 0),
- JS_FS("setDash", setDash_func, 0, 0),
+ JS_FN("hasCurrentPoint", hasCurrentPoint_func, 0, 0),
+ JS_FN("identityMatrix", identityMatrix_func, 0, 0),
+ JS_FN("inFill", inFill_func, 0, 0),
+ JS_FN("inStroke", inStroke_func, 0, 0),
+ JS_FN("lineTo", lineTo_func, 0, 0),
+ JS_FN("mask", mask_func, 0, 0),
+ JS_FN("maskSurface", maskSurface_func, 0, 0),
+ JS_FN("moveTo", moveTo_func, 0, 0),
+ JS_FN("newPath", newPath_func, 0, 0),
+ JS_FN("newSubPath", newSubPath_func, 0, 0),
+ JS_FN("paint", paint_func, 0, 0),
+ JS_FN("paintWithAlpha", paintWithAlpha_func, 0, 0),
+ JS_FN("pathExtents", pathExtents_func, 0, 0),
+ JS_FN("popGroup", popGroup_func, 0, 0),
+ JS_FN("popGroupToSource", popGroupToSource_func, 0, 0),
+ JS_FN("pushGroup", pushGroup_func, 0, 0),
+ JS_FN("pushGroupWithContent", pushGroupWithContent_func, 0, 0),
+ JS_FN("rectangle", rectangle_func, 0, 0),
+ JS_FN("relCurveTo", relCurveTo_func, 0, 0),
+ JS_FN("relLineTo", relLineTo_func, 0, 0),
+ JS_FN("relMoveTo", relMoveTo_func, 0, 0),
+ JS_FN("resetClip", resetClip_func, 0, 0),
+ JS_FN("restore", restore_func, 0, 0),
+ JS_FN("rotate", rotate_func, 0, 0),
+ JS_FN("save", save_func, 0, 0),
+ JS_FN("scale", scale_func, 0, 0),
+ JS_FN("selectFontFace", selectFontFace_func, 0, 0),
+ JS_FN("setAntialias", setAntialias_func, 0, 0),
+ JS_FN("setDash", setDash_func, 0, 0),
// setFontFace
// setFontMatrix
// setFontOptions
- JS_FS("setFontSize", setFontSize_func, 0, 0),
- JS_FS("setFillRule", setFillRule_func, 0, 0),
- JS_FS("setLineCap", setLineCap_func, 0, 0),
- JS_FS("setLineJoin", setLineJoin_func, 0, 0),
- JS_FS("setLineWidth", setLineWidth_func, 0, 0),
+ JS_FN("setFontSize", setFontSize_func, 0, 0),
+ JS_FN("setFillRule", setFillRule_func, 0, 0),
+ JS_FN("setLineCap", setLineCap_func, 0, 0),
+ JS_FN("setLineJoin", setLineJoin_func, 0, 0),
+ JS_FN("setLineWidth", setLineWidth_func, 0, 0),
// setMatrix
- JS_FS("setMiterLimit", setMiterLimit_func, 0, 0),
- JS_FS("setOperator", setOperator_func, 0, 0),
+ JS_FN("setMiterLimit", setMiterLimit_func, 0, 0),
+ JS_FN("setOperator", setOperator_func, 0, 0),
// setScaledFont
- JS_FS("setSource", setSource_func, 0, 0),
- JS_FS("setSourceRGB", setSourceRGB_func, 0, 0),
- JS_FS("setSourceRGBA", setSourceRGBA_func, 0, 0),
- JS_FS("setSourceSurface", setSourceSurface_func, 0, 0),
- JS_FS("setTolerance", setTolerance_func, 0, 0),
+ JS_FN("setSource", setSource_func, 0, 0),
+ JS_FN("setSourceRGB", setSourceRGB_func, 0, 0),
+ JS_FN("setSourceRGBA", setSourceRGBA_func, 0, 0),
+ JS_FN("setSourceSurface", setSourceSurface_func, 0, 0),
+ JS_FN("setTolerance", setTolerance_func, 0, 0),
// showGlyphs
- JS_FS("showPage", showPage_func, 0, 0),
- JS_FS("showText", showText_func, 0, 0),
+ JS_FN("showPage", showPage_func, 0, 0),
+ JS_FN("showText", showText_func, 0, 0),
// showTextGlyphs
- JS_FS("stroke", stroke_func, 0, 0),
- JS_FS("strokeExtents", strokeExtents_func, 0, 0),
- JS_FS("strokePreserve", strokePreserve_func, 0, 0),
+ JS_FN("stroke", stroke_func, 0, 0),
+ JS_FN("strokeExtents", strokeExtents_func, 0, 0),
+ JS_FN("strokePreserve", strokePreserve_func, 0, 0),
// textPath
// textExtends
// transform
- JS_FS("translate", translate_func, 0, 0),
- JS_FS("userToDevice", userToDevice_func, 0, 0),
- JS_FS("userToDeviceDistance", userToDeviceDistance_func, 0, 0),
- JS_FS_END
-};
+ JS_FN("translate", translate_func, 0, 0),
+ JS_FN("userToDevice", userToDevice_func, 0, 0),
+ JS_FN("userToDeviceDistance", userToDeviceDistance_func, 0, 0),
+ JS_FS_END};
JSFunctionSpec gjs_cairo_context_static_funcs[] = { JS_FS_END };
diff --git a/modules/cairo-gradient.cpp b/modules/cairo-gradient.cpp
index 76b311d9..d4c45ac6 100644
--- a/modules/cairo-gradient.cpp
+++ b/modules/cairo-gradient.cpp
@@ -101,11 +101,10 @@ addColorStopRGBA_func(JSContext *context,
}
JSFunctionSpec gjs_cairo_gradient_proto_funcs[] = {
- JS_FS("addColorStopRGB", addColorStopRGB_func, 0, 0),
- JS_FS("addColorStopRGBA", addColorStopRGBA_func, 0, 0),
+ JS_FN("addColorStopRGB", addColorStopRGB_func, 0, 0),
+ JS_FN("addColorStopRGBA", addColorStopRGBA_func, 0, 0),
// getColorStopRGB
// getColorStopRGBA
- JS_FS_END
-};
+ JS_FS_END};
JSFunctionSpec gjs_cairo_gradient_static_funcs[] = { JS_FS_END };
diff --git a/modules/cairo-image-surface.cpp b/modules/cairo-image-surface.cpp
index 85942f9b..ee88bbd9 100644
--- a/modules/cairo-image-surface.cpp
+++ b/modules/cairo-image-surface.cpp
@@ -203,19 +203,17 @@ getStride_func(JSContext *context,
}
JSFunctionSpec gjs_cairo_image_surface_proto_funcs[] = {
- JS_FS("createFromPNG", createFromPNG_func, 0, 0),
+ JS_FN("createFromPNG", createFromPNG_func, 0, 0),
// getData
- JS_FS("getFormat", getFormat_func, 0, 0),
- JS_FS("getWidth", getWidth_func, 0, 0),
- JS_FS("getHeight", getHeight_func, 0, 0),
- JS_FS("getStride", getStride_func, 0, 0),
- JS_FS_END
-};
+ JS_FN("getFormat", getFormat_func, 0, 0),
+ JS_FN("getWidth", getWidth_func, 0, 0),
+ JS_FN("getHeight", getHeight_func, 0, 0),
+ JS_FN("getStride", getStride_func, 0, 0),
+ JS_FS_END};
JSFunctionSpec gjs_cairo_image_surface_static_funcs[] = {
- JS_FS("createFromPNG", createFromPNG_func, 1, GJS_MODULE_PROP_FLAGS),
- JS_FS_END
-};
+ JS_FN("createFromPNG", createFromPNG_func, 1, GJS_MODULE_PROP_FLAGS),
+ JS_FS_END};
JSObject *
gjs_cairo_image_surface_from_surface(JSContext *context,
diff --git a/modules/cairo-pattern.cpp b/modules/cairo-pattern.cpp
index d22fb64e..39ebf8e5 100644
--- a/modules/cairo-pattern.cpp
+++ b/modules/cairo-pattern.cpp
@@ -86,10 +86,9 @@ getType_func(JSContext *context,
JSFunctionSpec gjs_cairo_pattern_proto_funcs[] = {
// getMatrix
- JS_FS("getType", getType_func, 0, 0),
+ JS_FN("getType", getType_func, 0, 0),
// setMatrix
- JS_FS_END
-};
+ JS_FS_END};
JSFunctionSpec gjs_cairo_pattern_static_funcs[] = { JS_FS_END };
diff --git a/modules/cairo-region.cpp b/modules/cairo-region.cpp
index 871f258c..f30453b3 100644
--- a/modules/cairo-region.cpp
+++ b/modules/cairo-region.cpp
@@ -212,20 +212,19 @@ JSPropertySpec gjs_cairo_region_proto_props[] = {
};
JSFunctionSpec gjs_cairo_region_proto_funcs[] = {
- JS_FS("union", union_func, 0, 0),
- JS_FS("subtract", subtract_func, 0, 0),
- JS_FS("intersect", intersect_func, 0, 0),
- JS_FS("xor", xor_func, 0, 0),
-
- JS_FS("unionRectangle", union_rectangle_func, 0, 0),
- JS_FS("subtractRectangle", subtract_rectangle_func, 0, 0),
- JS_FS("intersectRectangle", intersect_rectangle_func, 0, 0),
- JS_FS("xorRectangle", xor_rectangle_func, 0, 0),
-
- JS_FS("numRectangles", num_rectangles_func, 0, 0),
- JS_FS("getRectangle", get_rectangle_func, 0, 0),
- JS_FS_END
-};
+ JS_FN("union", union_func, 0, 0),
+ JS_FN("subtract", subtract_func, 0, 0),
+ JS_FN("intersect", intersect_func, 0, 0),
+ JS_FN("xor", xor_func, 0, 0),
+
+ JS_FN("unionRectangle", union_rectangle_func, 0, 0),
+ JS_FN("subtractRectangle", subtract_rectangle_func, 0, 0),
+ JS_FN("intersectRectangle", intersect_rectangle_func, 0, 0),
+ JS_FN("xorRectangle", xor_rectangle_func, 0, 0),
+
+ JS_FN("numRectangles", num_rectangles_func, 0, 0),
+ JS_FN("getRectangle", get_rectangle_func, 0, 0),
+ JS_FS_END};
JSFunctionSpec gjs_cairo_region_static_funcs[] = { JS_FS_END };
diff --git a/modules/cairo-solid-pattern.cpp b/modules/cairo-solid-pattern.cpp
index 0a0a50bf..597040b8 100644
--- a/modules/cairo-solid-pattern.cpp
+++ b/modules/cairo-solid-pattern.cpp
@@ -103,10 +103,9 @@ createRGBA_func(JSContext *context,
}
JSFunctionSpec gjs_cairo_solid_pattern_proto_funcs[] = {
- JS_FS("createRGB", createRGB_func, 0, 0),
- JS_FS("createRGBA", createRGBA_func, 0, 0),
- JS_FS_END
-};
+ JS_FN("createRGB", createRGB_func, 0, 0),
+ JS_FN("createRGBA", createRGBA_func, 0, 0),
+ JS_FS_END};
JSFunctionSpec gjs_cairo_solid_pattern_static_funcs[] = { JS_FS_END };
diff --git a/modules/cairo-surface-pattern.cpp b/modules/cairo-surface-pattern.cpp
index 232e8a8e..44e558b2 100644
--- a/modules/cairo-surface-pattern.cpp
+++ b/modules/cairo-surface-pattern.cpp
@@ -175,12 +175,11 @@ getFilter_func(JSContext *context,
}
JSFunctionSpec gjs_cairo_surface_pattern_proto_funcs[] = {
- JS_FS("setExtend", setExtend_func, 0, 0),
- JS_FS("getExtend", getExtend_func, 0, 0),
- JS_FS("setFilter", setFilter_func, 0, 0),
- JS_FS("getFilter", getFilter_func, 0, 0),
- JS_FS_END
-};
+ JS_FN("setExtend", setExtend_func, 0, 0),
+ JS_FN("getExtend", getExtend_func, 0, 0),
+ JS_FN("setFilter", setFilter_func, 0, 0),
+ JS_FN("getFilter", getFilter_func, 0, 0),
+ JS_FS_END};
JSFunctionSpec gjs_cairo_surface_pattern_static_funcs[] = { JS_FS_END };
diff --git a/modules/cairo-surface.cpp b/modules/cairo-surface.cpp
index 8f0e50a5..d14e03a8 100644
--- a/modules/cairo-surface.cpp
+++ b/modules/cairo-surface.cpp
@@ -113,7 +113,7 @@ JSFunctionSpec gjs_cairo_surface_proto_funcs[] = {
// flush
// getContent
// getFontOptions
- JS_FS("getType", getType_func, 0, 0),
+ JS_FN("getType", getType_func, 0, 0),
// markDirty
// markDirtyRectangle
// setDeviceOffset
@@ -123,9 +123,8 @@ JSFunctionSpec gjs_cairo_surface_proto_funcs[] = {
// copyPage
// showPage
// hasShowTextGlyphs
- JS_FS("writeToPNG", writeToPNG_func, 0, 0),
- JS_FS_END
-};
+ JS_FN("writeToPNG", writeToPNG_func, 0, 0),
+ JS_FS_END};
JSFunctionSpec gjs_cairo_surface_static_funcs[] = { JS_FS_END };
diff --git a/modules/system.cpp b/modules/system.cpp
index 001e94ea..ea135a26 100644
--- a/modules/system.cpp
+++ b/modules/system.cpp
@@ -165,15 +165,14 @@ gjs_clear_date_caches(JSContext *context,
}
static JSFunctionSpec module_funcs[] = {
- JS_FS("addressOf", gjs_address_of, 1, GJS_MODULE_PROP_FLAGS),
- JS_FS("refcount", gjs_refcount, 1, GJS_MODULE_PROP_FLAGS),
- JS_FS("breakpoint", gjs_breakpoint, 0, GJS_MODULE_PROP_FLAGS),
- JS_FS("dumpHeap", gjs_dump_heap, 1, GJS_MODULE_PROP_FLAGS),
- JS_FS("gc", gjs_gc, 0, GJS_MODULE_PROP_FLAGS),
- JS_FS("exit", gjs_exit, 0, GJS_MODULE_PROP_FLAGS),
- JS_FS("clearDateCaches", gjs_clear_date_caches, 0, GJS_MODULE_PROP_FLAGS),
- JS_FS_END
-};
+ JS_FN("addressOf", gjs_address_of, 1, GJS_MODULE_PROP_FLAGS),
+ JS_FN("refcount", gjs_refcount, 1, GJS_MODULE_PROP_FLAGS),
+ JS_FN("breakpoint", gjs_breakpoint, 0, GJS_MODULE_PROP_FLAGS),
+ JS_FN("dumpHeap", gjs_dump_heap, 1, GJS_MODULE_PROP_FLAGS),
+ JS_FN("gc", gjs_gc, 0, GJS_MODULE_PROP_FLAGS),
+ JS_FN("exit", gjs_exit, 0, GJS_MODULE_PROP_FLAGS),
+ JS_FN("clearDateCaches", gjs_clear_date_caches, 0, GJS_MODULE_PROP_FLAGS),
+ JS_FS_END};
bool
gjs_js_define_system_stuff(JSContext *context,
diff --git a/test/gjs-test-call-args.cpp b/test/gjs-test-call-args.cpp
index bec91393..a27d1c20 100644
--- a/test/gjs-test-call-args.cpp
+++ b/test/gjs-test-call-args.cpp
@@ -218,36 +218,35 @@ JSNATIVE_TEST_FUNC_BEGIN(object_invalid_type)
JSNATIVE_TEST_FUNC_END
static JSFunctionSpec native_test_funcs[] = {
- JS_FS("noArgs", no_args, 0, 0),
- JS_FS("noArgsIgnoreTrailing", no_args_ignore_trailing, 0, 0),
- JS_FS("boolArgNoAssert", bool_arg_no_assert, 0, 0),
- JS_FS("intArgNoAssert", int_arg_no_assert, 0, 0),
- JS_FS("objectArgNoAssert", object_arg_no_assert, 0, 0),
- JS_FS("optionalIntArgsNoAssert", optional_int_args_no_assert, 0, 0),
- JS_FS("argsIgnoreTrailing", args_ignore_trailing, 0, 0),
- JS_FS("oneOfEachType", one_of_each_type, 0, 0),
- JS_FS("optionalArgsAll", optional_args_all, 0, 0),
- JS_FS("optionalArgsOnlyRequired", optional_args_only_required, 0, 0),
- JS_FS("onlyOptionalArgs", only_optional_args, 0, 0),
- JS_FS("unsignedEnumArg", unsigned_enum_arg, 0, 0),
- JS_FS("signedEnumArg", signed_enum_arg, 0, 0),
- JS_FS("oneOfEachNullableType", one_of_each_nullable_type, 0, 0),
- JS_FS("unwindFreeTest", unwind_free_test, 0, 0),
- JS_FS("boolInvalidNullable", bool_invalid_nullable, 0, 0),
- JS_FS("intInvalidNullable", int_invalid_nullable, 0, 0),
- JS_FS("unsignedInvalidNullable", unsigned_invalid_nullable, 0, 0),
- JS_FS("int64_tInvalidNullable", int64_t_invalid_nullable, 0, 0),
- JS_FS("doubleInvalidNullable", double_invalid_nullable, 0, 0),
- JS_FS("boolInvalidType", bool_invalid_type, 0, 0),
- JS_FS("intInvalidType", int_invalid_type, 0, 0),
- JS_FS("unsignedInvalidType", unsigned_invalid_type, 0, 0),
- JS_FS("int64_tInvalidType", int64_t_invalid_type, 0, 0),
- JS_FS("doubleInvalidType", double_invalid_type, 0, 0),
- JS_FS("GjsAutoCharInvalidType", GjsAutoChar_invalid_type, 0, 0),
- JS_FS("GjsAutoJSCharInvalidType", GjsAutoJSChar_invalid_type, 0, 0),
- JS_FS("objectInvalidType", object_invalid_type, 0, 0),
- JS_FS_END
-};
+ JS_FN("noArgs", no_args, 0, 0),
+ JS_FN("noArgsIgnoreTrailing", no_args_ignore_trailing, 0, 0),
+ JS_FN("boolArgNoAssert", bool_arg_no_assert, 0, 0),
+ JS_FN("intArgNoAssert", int_arg_no_assert, 0, 0),
+ JS_FN("objectArgNoAssert", object_arg_no_assert, 0, 0),
+ JS_FN("optionalIntArgsNoAssert", optional_int_args_no_assert, 0, 0),
+ JS_FN("argsIgnoreTrailing", args_ignore_trailing, 0, 0),
+ JS_FN("oneOfEachType", one_of_each_type, 0, 0),
+ JS_FN("optionalArgsAll", optional_args_all, 0, 0),
+ JS_FN("optionalArgsOnlyRequired", optional_args_only_required, 0, 0),
+ JS_FN("onlyOptionalArgs", only_optional_args, 0, 0),
+ JS_FN("unsignedEnumArg", unsigned_enum_arg, 0, 0),
+ JS_FN("signedEnumArg", signed_enum_arg, 0, 0),
+ JS_FN("oneOfEachNullableType", one_of_each_nullable_type, 0, 0),
+ JS_FN("unwindFreeTest", unwind_free_test, 0, 0),
+ JS_FN("boolInvalidNullable", bool_invalid_nullable, 0, 0),
+ JS_FN("intInvalidNullable", int_invalid_nullable, 0, 0),
+ JS_FN("unsignedInvalidNullable", unsigned_invalid_nullable, 0, 0),
+ JS_FN("int64_tInvalidNullable", int64_t_invalid_nullable, 0, 0),
+ JS_FN("doubleInvalidNullable", double_invalid_nullable, 0, 0),
+ JS_FN("boolInvalidType", bool_invalid_type, 0, 0),
+ JS_FN("intInvalidType", int_invalid_type, 0, 0),
+ JS_FN("unsignedInvalidType", unsigned_invalid_type, 0, 0),
+ JS_FN("int64_tInvalidType", int64_t_invalid_type, 0, 0),
+ JS_FN("doubleInvalidType", double_invalid_type, 0, 0),
+ JS_FN("GjsAutoCharInvalidType", GjsAutoChar_invalid_type, 0, 0),
+ JS_FN("GjsAutoJSCharInvalidType", GjsAutoJSChar_invalid_type, 0, 0),
+ JS_FN("objectInvalidType", object_invalid_type, 0, 0),
+ JS_FS_END};
static void
setup(GjsUnitTestFixture *fx,