comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Structures and Call_External
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Structures and Call_External [message #1863] Wed, 23 March 1994 10:21 Go to previous message
rarback is currently offline  rarback
Messages: 15
Registered: October 1992
Junior Member
In a previous article, rivers@bnlux1.bnl.gov (Mark Rivers) writes:
> Passing structures to/from IDL with CALL_EXTERNAL is officially
> unsupported. HOWEVER, it does presently work. What is passed is the
> address of the first element in the structure. So you can define an IDL
> structure which is the same as your C structure, pass its address in
> CALL_EXTERNAL, and use memcpy to copy the data from the C structure to the
> IDL structure. The only caveat at present is that your IDL structure cannot
> contain strings, because these are passed by descriptor in the
> structure. You can use BYTE arrays in place of strings. Other than
> strings the IDL structures allocate memory sequentially for each element
> just as C does. On some platforms there may be data alignment issues
> which you will have to determine empirically.

It appears that IDL structures share the alignment of the "native" machine's
C compiler. In particular, in porting some (inherently nonportable) IDL code
from OpenVMS/VAX to OpenVMS/AXP, the structure alignment went from completely
unpadded (VAX C) to strict member alignment (DEC C).

--Harvey
----
Harvey Rarback phone: (516) 282-5626
CARS fax: (516) 282-7078
Building 815 Internet: rarback@bnlx26.nsls.bnl.gov
Brookhaven National Lab ESnet/SPAN: BNLX26::RARBACK
Upton, NY 11973 BITNET: RARBACK@BNL
[Message index]
 
Read Message
Read Message
Previous Topic: map projection polygon problem
Next Topic: Re: map projection polygon problem

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 07:13:48 PDT 2025

Total time taken to generate the page: 1.91768 seconds