Re: Mixing Objective C and C++
Re: Mixing Objective C and C++
- Subject: Re: Mixing Objective C and C++
- From: Guy English <email@hidden>
- Date: Tue, 25 Jan 2005 17:34:14 -0500
On Tue, 25 Jan 2005 22:20:49 +0100, Bert Torfs <email@hidden> wrote:
> It seems to me as if C++ and objectiveC store doubles differently, and
> the compiler mixes the 2 in my case.
No, they both store them the same way. What's likely happening is that
the return value is getting mangled somehow. You could try looking at
the assembly for the function that calls this one. Also make sure the
you're declaring your methods to return double. A mistake like that
will give you some really rotten results.
If was to hazzard a guess I'd say you delcared a method to return an
NSDecimal but actuall return a double. Or you've assigned the result
of this method into an NSDecimal and somehow the linker has let you
get away with it. Either way an NSDecimal is a struct and has
different passing conventions from the double and you'll get some
really wacky things going on if your linker hasn't been all over you
about it.
Guy
I guess I can solve it by
> delegating the caching of the Objective C objects to a helper object,
> so the C++ objects remain 'pure'.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden