After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 623775 - Adjust for g-i change to remove machine-independent type tags
Adjust for g-i change to remove machine-independent type tags
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on: 623774
Blocks:
 
 
Reported: 2010-07-07 18:50 UTC by Colin Walters
Modified: 2010-07-09 18:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Adjust for g-i change to remove machine-independent type tags (8.45 KB, patch)
2010-07-07 18:50 UTC, Colin Walters
accepted-commit_now Details | Review

Description Colin Walters 2010-07-07 18:50:51 UTC
See bug 623774.
Comment 1 Colin Walters 2010-07-07 18:50:53 UTC
Created attachment 165433 [details] [review]
Adjust for g-i change to remove machine-independent type tags
Comment 2 Johan (not receiving bugmail) Dahlin 2010-07-09 13:03:04 UTC
Review of attachment 165433 [details] [review]:

Looks good, should land as soon as the g-i patch lands.

::: gi/arg.c
@@ +124,2 @@
 static GITypeTag
 normalize_int_types(GITypeTag type) {

Can't you just inline type_tag_from_size() in the switch cases, sounds simpler to me.
Assuming we don't have plans to introduce more machine dependent types.

::: test/js/testEverythingBasic.js
@@ +74,3 @@
     assertEquals(-42, Everything.test_double(-42));
 
+    let now = Math.floor(new Date().getTime() / 1000);

Unrelated change, please exclude.
Comment 3 Colin Walters 2010-07-09 13:32:22 UTC
(In reply to comment #2)
> Review of attachment 165433 [details] [review]:
> 
> Looks good, should land as soon as the g-i patch lands.
> 
> ::: gi/arg.c
> @@ +124,2 @@
>  static GITypeTag
>  normalize_int_types(GITypeTag type) {
> 
> Can't you just inline type_tag_from_size() in the switch cases, sounds simpler
> to me.
> Assuming we don't have plans to introduce more machine dependent types.

OK.

> ::: test/js/testEverythingBasic.js
> @@ +74,3 @@
>      assertEquals(-42, Everything.test_double(-42));
> 
> +    let now = Math.floor(new Date().getTime() / 1000);
> 
> Unrelated change, please exclude.

It is related - we removed the date type, so now we need to operate in terms of a number.  Because javascript uses double, for reliability we need to floor them before comparison.
Comment 4 Colin Walters 2010-07-09 18:29:27 UTC
Updated for comments and committed.