Opened 10 years ago

Last modified 10 years ago

#3218 new defect

The read_write.* interface seems a bit off

Reported by: Adrian Pop Owned by: somebody
Priority: high Milestone: Future
Component: Run-time Version: trunk
Keywords: Cc: Mahder Alemseged Gebremedhin, Martin Sjölund

Description

read_write.c uses malloc instead of GC_malloc.
Do we really need this elaborate interface anymore?
Can't we just send MetaModelica values directly now?
This is afaik used only to send/receive data from external functions compiled as dlls during instantiation and probably during scripting.

Change History (4)

comment:1 by Martin Sjölund, 10 years ago

I am unsure if you can send MM values directly; they cross dll boundaries.

comment:2 by Adrian Pop, 10 years ago

Yes, but is our dll, or isn't?

comment:3 by Martin Sjölund, 10 years ago

Yes, but directly after returning, we free the dll, right? Don't you then (on MSVC) lose the data you allocated, like strings?

comment:4 by Adrian Pop, 10 years ago

We can do as we do now and when the dll returns we duplicate the data and free the dll, just with metamodelica values.

Note: See TracTickets for help on using tickets.