[orbitcpp-list] Re: C++ mapping of OUT variable-length structures
Status: Beta
Brought to you by:
philipd
From: Diego S. R. <dse...@di...> - 2002-04-24 19:11:25
|
Hi! Por 24/Apr/2002, 20:44:27, dec=EDa ERDI Gergo: | On Wed, 24 Apr 2002, Diego Sevilla Ruiz wrote: |=20 | > I hope I can explain it well... Please, take a look at H&V book, page= s | > 300-302. The question is that as the _out types are allocated by the | > callee, (and are passed by reference), there must be a way to dealloc= ate | > the previous owned reference if you use a _var type. |=20 | So this is useful when you pass in (on the caller side) a non-empty | structure, right? Hmmm... I can't understand what you mean by a non-empty structure... This has nothing to do with either if the structure is empty or non-empty... (and I don't see the need for an empty structure either...) |=20 | > In the C++ mapping (contrary to the C mapping) out types are always | > allocated by the callee and freed by the caller. |=20 | Does this also hold for arrays of variable-length items? |=20 yes. It is the same (array_slice*&, which is allocated within the object implementation). C++ mapping is pretty homogeneous. Best regards. diego. --=20 Diego Sevilla Ruiz http://ditec.um.es/~dsevilla dse...@um... \ /\ Dpto. Ingenier=EDa y Tecnolog=EDa de Computadores http://ditec.um.es ) = ( ') Visiting Extreme! Computing Lab http://extreme.indiana.edu ( / ) Indiana University, Bloomington http://www.iub.edu \(__)| |