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 607661 - The 0 value should be excluded from allowed values range of the function gtk_table_new()
The 0 value should be excluded from allowed values range of the function gtk_...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.19.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2010-01-21 13:58 UTC by tigran
Modified: 2010-07-10 01:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Update table documentation to say "in the range of 1...65535" (664 bytes, patch)
2010-01-29 13:02 UTC, Christian Dywan
needs-work Details | Review

Description tigran 2010-01-21 13:58:05 UTC
According to the documentation the first two arguments of the function gtk_table_new() must be in the range 0 ..65535. But the 0 value for both arguments doesn't have any meaning.

Also reported at http://linuxtesting.org/results/report?num=D0147
Comment 1 Christian Persch 2010-01-21 15:12:06 UTC
> But the 0 value for both arguments doesn't have any meaning.

google codesearch reveals there are in fact many instances of passing 0 for one or both of these args out there. (The code in gtk_table_new() just uses 1 if passed 0.) So for API compat, passing 0 needs to continue to be accepted here. 

[BTW: the link doesn't work.]
Comment 2 tigran 2010-01-22 09:33:54 UTC
There is no need to change the source code because of compatibality reason, but it would be better to change the documentation to not confuse the programmers.
Comment 3 Christian Dywan 2010-01-29 13:02:55 UTC
Created attachment 152567 [details] [review]
Update table documentation to say "in the range of 1...65535"
Comment 4 Matthias Clasen 2010-02-09 03:39:23 UTC
Would be good to add something like "For historical reasons, 0 is accepted as well and is silently interpreted as 1.".