On 2011-03-15 13:25-0000 Andrew Ross wrote:

>
> Alan,
>
> For the C++ case I will make the required changes so the C++ wrapper
> has const PLFLT * const * in . This way explicit casting is not
> required.

Hi Andrew:

Now that I have cooled down from my anger and dismay at what the C
standard requires for immutable doubly dimensioned arrays, I do
realize that most C libraries do not have such arrays as arguments.
PLplot is quite unique in having so many of them, and presumably it
was difficult for the C standards committee to anticipate our unique
needs.

Thanks in advance for your planned C++ bindings change.  From what you
say it appears you will be able to revert my explicit casting changes
in examples/c++ without build errors which was my principal concern.
If you look in the svn book, there is a method given there to do such
wholesale reversions without having to edit the code in examples/c++.
I will hold off on a planned stylings update until you are done to
simplify that reversion.

Your planned change means rebuilds of old libraries and apps against
the next release of PLplot should just work without build errors and
with no source code changes required for those libraries and apps.  Of
course, there will be build warnings from the C compiler for every
doubly dimensioned PLplot API argument for every C app or library that
depends on PLplot, but I think that result is acceptable. Of course,
we should give advice in the release notes on how to avoid those C
warnings with explicit casts while referring to
http://c-faq.com/ansi/constmismatch.html for the justification.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to