[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] Re: patches for trunk



Looks like is different depending on processor... from CGBase.h I see this:


#if defined(__LP64__) && __LP64__
typedef double CGFloat;
#define CGFLOAT_MIN DBL_MIN
#define CGFLOAT_MAX DBL_MAX
#define CGFLOAT_IS_DOUBLE 1
#else	/* !defined(__LP64__) || !__LP64__ */
typedef float CGFloat;
#define CGFLOAT_MIN FLT_MIN
#define CGFLOAT_MAX FLT_MAX
#define CGFLOAT_IS_DOUBLE 0
#endif	/* !defined(__LP64__) || !__LP64__ */
#define CGFLOAT_DEFINED 1

So - we have always used the 32-bit precision (since SC.app has always been 32-bit). Or - would slotDoubleVal take care of both contingencies OK?

Best,

Josh


On Nov 25, 2009, at 10:58 AM, Tim Blechmann wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 11/25/2009 07:36 PM, Josh Parmenter wrote:
>> And here are the errors for the 64-bit SCApp. My guess is some of these can be solved with casts? And when I say guess, I really am guessing. 
>> For instance:
>> 
>> /Users/joshp/supercollider/supercollider/Source/app/CocoaBridgePrimitives.M:888:0 /Users/joshp/supercollider/supercollider/Source/app/CocoaBridgePrimitives.M:888: error: cannot convert 'CGFloat*' to 'float*' for argument '2' to 'int slotFloatVal(PyrSlot*, float*)'
>> 
>> which refers to this bit of code:
>> 
>> 						PyrSlot *slots = slotRawObject(slot)->slots;
>> 						NSSize s;
>> 						slotFloatVal(slots+0, &s.width);
>> 
>> will compile with:
>> 
>> 						PyrSlot *slots = slotRawObject(slot)->slots;
>> 						NSSize s;
>> 						float width = (float)s.width;
>> 						slotFloatVal(slots+0, &width);
>> 
>> but I am not sure if that is really the correct way to solve the problem. If it is, I can start making some of those changes.
> 
> if CGFloat is a typedef for double, it could be enough to change
> slotFloatVal to slotDoubleVal, otherwise, the cast with a float should
> be ok ....
> 
> tim
> 
> - -- 
> tim@xxxxxxxxxx
> http://tim.klingt.org
> 
> Only very good and very bad programmers use goto in C
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> 
> iEYEARECAAYFAksNfj4ACgkQdL+4qsZfVst2iQCfW/dj4hskZ9nJKRYj24NXhud0
> jtQAn2PML4s/h4/XceQL43GYAi2qHx+5
> =kGCF
> -----END PGP SIGNATURE-----
> 
> 
> _______________________________________________
> sc-dev mailing list
> 
> info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
> archive: https://listarc.bham.ac.uk/marchives/sc-dev/
> search: https://listarc.bham.ac.uk/lists/sc-dev/search/

******************************************
/* Joshua D. Parmenter
http://www.realizedsound.net/josh/

“Every composer – at all times and in all cases – gives his own interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi Nono
*/


_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/