Re: C++ mapping of OUT variable-length structures
- From: Diego Sevilla Ruiz <dsevilla ditec um es>
- To: ERDI Gergo <cactus cactus rulez org>
- Cc: ORBit/C++ <orbitcpp-list lists sourceforge net>,orbit-list gnome org
- Subject: Re: C++ mapping of OUT variable-length structures
- Date: Wed, 24 Apr 2002 14:10:45 -0500
Hi!
Por 24/Apr/2002, 20:44:27, decía ERDI Gergo:
| On Wed, 24 Apr 2002, Diego Sevilla Ruiz wrote:
|
| > I hope I can explain it well... Please, take a look at H&V book, pages
| > 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 deallocate
| > the previous owned reference if you use a _var type.
|
| 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...)
|
| > In the C++ mapping (contrary to the C mapping) out types are always
| > allocated by the callee and freed by the caller.
|
| Does this also hold for arrays of variable-length items?
|
yes. It is the same (array_slice*&, which is allocated within the object
implementation). C++ mapping is pretty homogeneous.
Best regards.
diego.
--
Diego Sevilla Ruiz http://ditec.um.es/~dsevilla dsevilla@um.es \ /\
Dpto. Ingeniería y Tecnología de Computadores http://ditec.um.es ) ( ')
Visiting Extreme! Computing Lab http://extreme.indiana.edu ( / )
Indiana University, Bloomington http://www.iub.edu \(__)|
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]