Hello,
I'm writing a bridge to IDL from C. I have currently got almost everything to work. However, what I can not figure out is how to neatly create an array variable through the interface defined in idl_export.h. I have only three options as far as I know:
1. Use Import(Named)Array to point to the data. However, this would only create a pointer to the data I have previously defined. I do not wish to do this, since it would mean that if the data is modified outside of IDL, it will also be modified in IDL. Besides it clearly states that IDL_ImportArray can be used to create an array which IDL 'does not allocate'. I wish to create an array in which IDL does allocate the memory.
2. Create an IDL_ARRAY structure, and define a variable. Somehow I would need to allocate the right memory, besides there is no StoreArray.
3. Using execute_str(), I could execute a command directly into IDL, however, this strikes me as odd, since I can create Strings and scalars using the idl_export interface. Besides it is an additional interpretation I wish to save.
Anyone has any experience with this, who can help me?
Regards,
Vincent
|