Bug 2128 - Make pointers returned via TIFFGetField const ?
: Make pointers returned via TIFFGetField const ?
Status: RESOLVED LATER
: libtiff
default
: unspecified
: PC Linux
: P2 enhancement
: ---
Assigned To:
:
:
: migrated_to_gitlab
:
:
  Show dependency treegraph
 
Reported: 2009-12-01 04:10 by
Modified: 2019-10-01 14:19 (History)


Attachments
Make pointers returned via TIFFGetField const (12.18 KB, patch)
2009-12-01 04:10, Adam Goode
Details | Diff
Make the default whitepoint and ycbcrcoeffs arrays const (1.54 KB, patch)
2009-12-01 04:10, Adam Goode
Details | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-12-01 04:10:02
According to http://bugzilla.maptools.org/show_bug.cgi?id=2125#c6
callers are not allowed to modify pointer or array values returned from
TIFFGetField or the like. So, why not make this explicit in the documentation
by specifying these things as const?

Note that this is not an ABI change, since C does not encode const in
libraries. Also, this is not really an API change, since the varargs call
strips away all
the types anyway. So it really is more of a documentation change, making
explicit
what was already implicitly true anyway.

The first patch changes the documentation and the va_arg calls, the second
patch converts whitepoint and ycbcrcoeffs to be const.
------- Comment #1 From 2009-12-01 04:10:33 -------
Created an attachment (id=361) [details]
Make pointers returned via TIFFGetField const
------- Comment #2 From 2009-12-01 04:10:50 -------
Created an attachment (id=362) [details]
Make the default whitepoint and ycbcrcoeffs arrays const
------- Comment #3 From 2019-10-01 14:19:21 -------
Bugzilla is no longer used for tracking libtiff issues. Remaining open tickets,
such as this one, have been migrated to the libtiff GitLab instance at
https://gitlab.com/libtiff/libtiff/issues .

The migrated tickets have their summary prefixed with [BZ#XXXX] where XXXX is
the initial Bugzilla issue number.