On Aug 7, 2013, at 3:00 PM, Alan W. Irwin <ir...@beluga.phys.uvic.ca> wrote:

> On 2013-08-07 15:45-0600 Orion Poplawski wrote:
> 
>> So, svn commit 12288:
>> 
>> ------------------------------------------------------------------------
>> r12288 | airwin | 2013-01-29 21:40:35 -0700 (Tue, 29 Jan 2013) | 13 lines
>> 
>> Replace plwid everywhere by plwidth, and store pen width
>> arguments as PLFLT's everywhere (that I can find them).
>> 
>> These changes allow width parameters < 1. to
>> work for cairo devices, e.g.,
>> 
>> examples/c/x03c.c  -dev xcairo -width 0.3
>> 
>> gives extremely thin line results.
>> 
>> Further discussion on list of what else there is to do.
>> 
>> 
>> ------------------------------------------------------------------------
>> 
>> --- bindings/ada/plplot.adb     (revision 12287)
>> +++ bindings/ada/plplot.adb     (working copy)
>> @@ -3311,10 +3311,10 @@
>> 
>> 
>>     -- Set pen width.
>> -    -- plwid
>> +    -- plwidth
>>     procedure Set_Pen_Width(Pen_Width : Integer) is
>>     begin
>> -        plwid(Pen_Width);
>> +        plwidth(Pen_Width);
>>     end Set_Pen_Width;
>> 
>> 
>> 
>> appears to have broken the ada bindings.  I get:
>> 
>> [ 13%] Building Ada object bindings/ada/CMakeFiles/plplotadad.dir/plplot.o
>> cd /export/home/orion/fedora/plplot/plplot-5.9.9/fedora/bindings/ada &&
>> /usr/bin/gnatgcc  -fPIC   -c
>> /export/home/orion/fedora/plplot/plplot-5.9.9/bindings/ada/plplot.adb -o
>> CMakeFiles/plplotadad.dir/plplot.o
>> plplot.adb:3317:17: expected type "Standard.Long_Float"
>> plplot.adb:3317:17: found type "Standard.Integer"
>> 
>> 
>> Now, I was about to simply change the argument to Set_Pen_Width to be a
>> Long_Float, but this changes the API/ABI.  So, should the ada bindings
>> grow a new interface (Set_Pen_Width_Float?) that takes a Long_Float and
>> calls plwidth?  That seems the most appropriate to me.
>> 
>> Comments?
> 
> Hi Orion:
> 
> Thanks for your report.
> 
> I cannot reproduce this for
> 
> irwin@raven> gnatgcc --version
> gnatgcc (Debian 4.6.3-14) 4.6.3
> 
> So I suspect you have a newer version of gnatgcc which is being more
> careful about types than 4.6.3.
> 
> @Jerry: is there a simple fix for what Orion has found?
> 
> Alan

I've only glanced at these e-mails but want to make a quick response anyway.

I would be stunned if the GNAT version difference was causing this because of 
being more careful about types. Ada has always been rigorous about types.

I noted the API change at the time but assumed that this had been discussed. 
Were no other languages affected? Do all the other PLplot languages 
automatically convert types so that this did not appear as an API change?

To answer to "if there is a simple fix" I need to know what we want to present 
to the user as an API. Do we want to break backward compatibility? If we want 
to keep backward compatibility then indeed a new function is in order. It could 
be an overloaded function, however, so that the same function name works 
depending on if the argument is Integer or Long_Float; however, it would need 
to call a different C routine. As I said, I haven't yet dug into this today so 
some of my comments may have obvious answers. More later.

Jerry
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to