Re: assigning to variable arguments
Re: assigning to variable arguments
- Subject: Re: assigning to variable arguments
- From: "Justin C. Walker" <email@hidden>
- Date: Thu, 1 Dec 2005 21:27:57 -0800
Hi, all,
Adding my $0.017 e:
On Dec 1, 2005, at 21:05 , Madan Kumar B N wrote:
Hi,
I ran into the same trouble with Fireworks Codebase. I workaround
this by
passing ptrs instead of the objects.
My problem was little typical because I was supposed to pass class
objects.
Passing simple POD-types through va_arg list works but when we try
to pass
our class objects in va_lists it would fail,so would prefer passing
pts.
It's been a while since I fiddled with this, but I believe that, in
gcc 4.x (in fact, from gcc 3.3 on), support for the (ill-
conceived :-}) varargs hack has been eliminated (or deprecated, I
think, depending on how the compiler is built).
If you look at <varargs.h>on Mac OS X, 10.4, you will see that it is
"MWERKS-only".
If you want to use this kind of code with gcc 4, I think you need to
use <stdarg.h> and modify your source appropriately. I have lost the
URL, but if you google appropriately, you can find instructions for
the more-or-less straight-forward modifications you need to make to
bring your code "up to date".
Regards,
Justin
On 12/1/05 10:04 PM, "Andy Finnell" <email@hidden> wrote:
Hi all,
I'm converting a project from CodeWarrior to Xcode 2.2/gcc 4. I've
run into some code that attempts reorder a variable argument list
(for localized string formatting). The basic code is:
va_start(argList, format);
int foo = 4;
va_arg(argList, int) = foo;
gcc doesn't like the last line because va_arg doesn't return an lval.
Specifcally its says "invalid lvalue in assignment". Apparently
CodeWarrior va_arg returned a reference, which gcc doesn't.
Is there any way to modify a va_list, either in place or build one up
dynamically?
Thanks,
-andy
--
Andy Finnell
Senior Software Architect
Order N Development, LLC
http://www.orderndev.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40macromedia.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
Justin C. Walker, Curmudgeon-At-Large
Institute for General Semantics
--------
Experience is what you get
when you don't get what you want.
--------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden