From a5d4c3203df47d6a0fb004fa82adc389e3d7f9c8 Mon Sep 17 00:00:00 2001 From: skalogryz Date: Mon, 6 Apr 2009 14:41:37 +0000 Subject: [PATCH] fixed PowerPC declaration stretreg and added linking to Foundation framework for objcrtltest git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@766 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- bindings/objc/objcrtl.pas | 2 +- bindings/objc/objcrtltest.pas | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/objc/objcrtl.pas b/bindings/objc/objcrtl.pas index 6db93a092..d6b4f1ff4 100644 --- a/bindings/objc/objcrtl.pas +++ b/bindings/objc/objcrtl.pas @@ -396,7 +396,7 @@ begin Pointer(objc_msgSend_stretreg) := GetProcedureAddress(hnd, 'objc_msgSend'); {$else} Pointer(objc_msgSend_fpret) := GetProcedureAddress(hnd, 'objc_msgSend'); - Pointer(objc_msgSend_stretreg) := GetProcedureAddress(hnd, 'objc_msgSend_streg'); + Pointer(objc_msgSend_stretreg) := GetProcedureAddress(hnd, 'objc_msgSends_stret'); {$endif} Result := true; end; diff --git a/bindings/objc/objcrtltest.pas b/bindings/objc/objcrtltest.pas index f584f4833..f0ffd8f16 100644 --- a/bindings/objc/objcrtltest.pas +++ b/bindings/objc/objcrtltest.pas @@ -21,7 +21,7 @@ uses objcrtl20, objcrtl10, objcrtl, objcrtlutils; {.$linkframework AppKit} -{.$linkframework Foundation} +{$linkframework Foundation} type TSubStructure = packed record @@ -100,7 +100,7 @@ var cl : _Class; b : Boolean; begin - cl := objc_allocateClassPair(objcclass('NSObject'), NewClassName, 0); + cl := objc_allocateClassPair(objc_getClass('NSObject'), NewClassName, 0); b := class_addMethod(cl, selector(OverrideMethod), @imp_init, overrideMethodEnc) and class_addMethod(cl, selector(newMethod1), @imp_newMethod1, newMethod1Enc) and class_addMethod(cl, selector(newMethod2), @imp_newMethod2, newMethod2Enc) and