From e6271a85e72cabc4e8cc92a6dc6a45ce43bb79e4 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sun, 4 Sep 2022 15:12:00 +0200 Subject: [PATCH] [smjs] Replaced JSID_TO_INT by toInt() and JSID_IS_INT by isInt() --- src/scripting/smjs/session_object.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/scripting/smjs/session_object.cpp b/src/scripting/smjs/session_object.cpp index 2611ffbb3..ff282b698 100644 --- a/src/scripting/smjs/session_object.cpp +++ b/src/scripting/smjs/session_object.cpp @@ -106,7 +106,7 @@ smjs_location_array_get_property(JSContext *ctx, JS::HandleObject hobj, JS::Hand hvp.setUndefined(); - if (!JSID_IS_INT(id)) + if (!id.isInt()) return false; assert(ses); @@ -114,7 +114,7 @@ smjs_location_array_get_property(JSContext *ctx, JS::HandleObject hobj, JS::Hand if (!have_location(ses)) return false; - index = JSID_TO_INT(id); + index = id.toInt(); for (loc = cur_loc(ses); loc != (struct location *) &ses->history.history; loc = index > 0 ? loc->next : loc->prev) { @@ -593,7 +593,7 @@ session_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS (JSClass *) &session_class, NULL); if (!ses) return false; - if (!JSID_IS_INT(id)) { + if (!id.isInt()) { /* Note: If we return false here, the object's methods do not * work. */ return true; @@ -894,7 +894,7 @@ session_set_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS (JSClass *) &session_class, NULL); if (!ses) return false; - if (!JSID_IS_INT(id)) + if (!id.isInt()) return false; return false; @@ -1042,13 +1042,13 @@ session_array_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId h hvp.setUndefined(); - if (!JSID_IS_INT(hid)) + if (!hid.isInt()) return false; assert(term); if_assert_failed return true; - index = JSID_TO_INT(hid); + index = hid.toInt(); foreach_tab (tab, term->windows) { if (!index) break; --index;