Rename some JS methods to be more vala-esque.
This commit is contained in:
parent
56651ed8c4
commit
3a3b5d0bff
2 changed files with 4 additions and 4 deletions
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue