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 645181 - string.index_of_nth_char should return long, not int
string.index_of_nth_char should return long, not int
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: Basic Types
0.41.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2011-03-18 19:47 UTC by Adam Dingle
Modified: 2018-05-22 13:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glib-2.0: Make string.index_of_nth_char() return index of type long (922 bytes, patch)
2018-02-27 10:01 UTC, Rico Tzschichholz
none Details | Review

Description Adam Dingle 2011-03-18 19:47:30 UTC
The builtin string method

  public int index_of_nth_char (long c)

returns an int.  It should instead return a long since that's the data type used to represent byte indexes in other string methods.
Comment 1 Michael 'Mickey' Lauer 2018-02-21 11:29:04 UTC
Agreed. Would that have any negative consequences for existing code?
Comment 2 Rico Tzschichholz 2018-02-27 10:01:47 UTC
Created attachment 368997 [details] [review]
glib-2.0: Make string.index_of_nth_char() return index of type long
Comment 3 Rico Tzschichholz 2018-02-27 10:17:12 UTC
Needs to be postponed until next cycle. A bunch of projects assigning the result to explicit "int" variables which obviously causes failures.

http://paldo.org:8010/builders/vala-staging/builds/442
Comment 4 GNOME Infrastructure Team 2018-05-22 13:58:43 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/183.