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 764791 - gitypelib.c: increase #define MAX_NAME_LEN from 200 to 255
gitypelib.c: increase #define MAX_NAME_LEN from 200 to 255
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: libgirepository
1.46.x
Other All
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-04-08 15:40 UTC by Krishnamoney
Modified: 2017-12-19 18:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Expand MAX_NAME_LEN to 2048 (331 bytes, patch)
2016-07-11 18:53 UTC, Adam Israel
needs-work Details | Review
bug-764791: increase MAX_NAME_LEN (695 bytes, patch)
2017-11-03 18:00 UTC, Lezz Giles
committed Details | Review

Description Krishnamoney 2016-04-08 15:40:23 UTC
MAX_NAME_LEN should be increased to 255 from current 200 value. This length is not sufficient sometimes while dealing with generated names from yang tool chain etc.

File girepository/gi_typelib.c 

#define MAX_NAME_LEN  200 <-- should be changed to 255
Comment 1 Colin Walters 2016-05-08 19:38:23 UTC
We could, as far as I can see nothing is really using this.  I don't think there are any real limits on string size.

The internet seems to imply 2048 would be more reasonable:
http://stackoverflow.com/questions/6007568/what-is-max-length-for-an-c-c-identifier-on-common-build-systems

But even if we fixed it you wouldn't be able to use it until you had a new g-i.
Comment 2 Adam Israel 2016-07-11 18:53:41 UTC
Created attachment 331259 [details] [review]
Expand MAX_NAME_LEN to 2048

This patch expands the MAX_NAME_LEN from 200 to 2048, based on feedback here and the referenced Stack Overflow discussion.
Comment 3 Lezz Giles 2017-11-02 18:26:47 UTC
Can this be implemented - it is a trivial change and should have no impact on functionality, but it would mean that in the future we don't need to maintain a fork of gobject-introspection just so we can have the longer MAX_NAME_LEN.
Comment 4 Emmanuele Bassi (:ebassi) 2017-11-02 18:33:16 UTC
Review of attachment 331259 [details] [review]:

Thanks for your patience.

Could you please attach a new patch, made by `git format-patch` or, better, `git-bz`? This would speed up the review and attribution process.
Comment 5 Lezz Giles 2017-11-03 18:00:27 UTC
Created attachment 362923 [details] [review]
bug-764791: increase MAX_NAME_LEN
Comment 6 Lezz Giles 2017-11-16 20:23:39 UTC
It would be good to know what timeframe I should expect this to be included in.  If there is anything else I can do please let me know - this should be a trivial change.
Comment 7 Lezz Giles 2017-12-19 18:24:49 UTC
Any update on this?
Comment 8 Emmanuele Bassi (:ebassi) 2017-12-19 18:55:25 UTC
Review of attachment 362923 [details] [review]:

Hi, thanks again.

The commit message is a bit scarce.

The typical format is explained here: https://wiki.gnome.org/Git/CommitMessages

I've taken the liberty of avoiding another round of review, and pushed an amended commit message.
Comment 9 Emmanuele Bassi (:ebassi) 2017-12-19 18:56:25 UTC
Pushed attachment 362923 [details] [review] as 017e172150de75238c521b7c87f224aa8316026b with an amended commit