[futurebasic] Re: [FB] CF Date Time

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 2005 : Group Archive : Group : All Groups

From: Brian Stevens <brilor@...>
Date: Sun, 4 Dec 2005 08:31:49 -0700
On Dec 4, 2005, at 12:37 AM, Robert Purves wrote:

>
> CFDateFormatterCreate does not crash when I run your example, but  
> CFDateFormatterCreateStringWithAbsoluteTime does. You need to  
> change the glue to:
>
> local fn CFDateFormatterCreateStringWithAbsoluteTime( allocator as  
> CFAllocatorRef, formatter as CFDateFormatterRef, at as  
> CFAbsoluteTime )
> beginassem
>    lwz    r12,^gPtrToFunction1
>    mr     r3,^allocator
>    mtspr  ctr,r12
>    mr     r4,^formatter
>    mr     r31,r2
>    lfd    f1,^at
>    bctrl
>    mr     r2,r31
> endassem
> end fn // CFStringRef
>
>
> Robert P.

Robert,

Thank you. Works perfectly. The only assembler I was ever good at was  
IBM 360/370 assembler. My knowledge of PPC assembler is not even  
rudimentary. If you or some other PPC guru have some time, please  
explain how to identify framework functions that need parms passed in  
the assembler glue versus those that don't.

For anyone following the thread, just substitute Robert's glue code  
and all is well. Also, DateString and TimeString can be removed from  
the code since the intent was to find a replacement for those  
deprecated (as of 10.4) calls.

Brian S.