Hi -

I'm thinking about implementing the following changes to the C integration 
support:

1) allow c_ptrTo to be passed a 1-D rectangular array or a tuple, and have it
    return a pointer to the first element == a pointer to the whole array.
    I've committed test cases in 
test/extern/ferguson/{tuple_to_pointer,array_to_pointer}.chpl
    Then the recommended way to pass an array to a C function would be 
something like
       call_C(c_ptrTo(myArray))
    instead of the pass-a-reference-to-the-first-element business.

2) allow a Chapel programmer to cast between different C types using the usual 
syntax.
    This came up when trying to work around the lack of (1).

Any thoughts on these, for or against?

Thanks,

-michael

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers

Reply via email to