[geary/bug/728002-webkit2: 25/140] Rename some JS methods to be more vala-esque.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/bug/728002-webkit2: 25/140] Rename some JS methods to be more vala-esque.
- Date: Tue, 31 Jan 2017 23:00:39 +0000 (UTC)
commit 3a3b5d0bffe2f42a6fb96fc67efab9b6e2341cfa
Author: Michael James Gratton <mike vee net>
Date: Fri Nov 25 16:05:30 2016 +1100
Rename some JS methods to be more vala-esque.
bindings/vapi/javascriptcore-4.0.vapi | 4 ++--
src/client/components/client-web-view.vala | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/bindings/vapi/javascriptcore-4.0.vapi b/bindings/vapi/javascriptcore-4.0.vapi
index 430c353..fd64630 100644
--- a/bindings/vapi/javascriptcore-4.0.vapi
+++ b/bindings/vapi/javascriptcore-4.0.vapi
@@ -8,10 +8,10 @@ namespace JS {
public struct GlobalContext {
[CCode (cname = "JSValueIsNumber")]
- public bool isNumber(JS.Value value);
+ public bool is_number(JS.Value value);
[CCode (cname = "JSValueToNumber")]
- public double toNumber(JS.Value value, out JS.Value err);
+ public double to_number(JS.Value value, out JS.Value exception);
}
diff --git a/src/client/components/client-web-view.vala b/src/client/components/client-web-view.vala
index ba67d2b..98cb5fb 100644
--- a/src/client/components/client-web-view.vala
+++ b/src/client/components/client-web-view.vala
@@ -78,11 +78,11 @@ public class ClientWebView : WebKit.WebView {
throws JSError {
JS.GlobalContext context = result.get_global_context();
JS.Value value = result.get_value();
- if (!context.isNumber(value)) {
+ if (!context.is_number(value)) {
throw new JSError.TYPE("Value is not a number");
}
JS.Value? err = null;
- return (int) context.toNumber(value, out err);
+ return (int) context.to_number(value, out err);
}
private static inline uint to_wk2_font_size(Pango.FontDescription font) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]