CVSROOT: /cvs/gnome
Module name: ORBit2
Changes by: tml 05/02/01 15:53:16
Modified files:
. : ChangeLog
src/idl-compiler: orbit-idl-c-utils.c
Log message:
2005-02-01 Tor Lillqvist <[EMAIL PROTECTED]>
* src/idl-compiler/orbit-idl-c-utils.c (orbit_cbe_flatten_ref):
Take output file as parameter, output directly there instead of
returning a string.
Don't take the address of function parameters and pass it on to
the marshalling layers. Function parameters are not necessarily
aligned according to the alinments in orbit-config.h. Case in
point: long long on the x86. ORBIT_ALIGNOF_CORBA_LONG_LONG is 8,
but as function parameters on the stack, long longs only have
4-byte alignment. The lower levels will realign the address,
meaning long long IN parameters might have a completely wrong
value marshalled. The same presumably holds for doubles and long
doubles. Why this problem hasn't occured on Linux on x86, no
idea. I noticed it on Windows.
Instead, copy IN parameters to a field in a local struct variable,
and pass on the address of that field.
In theory, the above could hold on exotic architectures also for
OUT parameters, where the address of a parameter is also passed
on. But in that case the parameter is a pointer, and at least on
the x86, a pointer's alignment as parameter matches expectation in
orbit-config.h (4).
(orbit_cbe_maybe_copy_of_data_in): New helper function that
outputs the definition and initialization of the local copy of IN
parameters mentioned above.
(orbit_cbe_flatten_args): Modify accordingly.
URL :
http://cvs.gnome.org/bonsai/cvsquery.cgi?branch=&dir=ORBit2&who=tml&date=explicit&mindate=2005-02-01%2015:52&maxdate=2005-02-01%2015:54
_______________________________________________
cvs-commits-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/cvs-commits-list