소스 검색

* look in the iPhoneAll unit for NSFastEnumeration* types on iOS/iphonesim,
instead of in the CocoaAll unit

git-svn-id: trunk@22611 -

Jonas Maebe 12 년 전
부모
커밋
b1d661d774
1개의 변경된 파일8개의 추가작업 그리고 3개의 파일을 삭제
  1. 8 3
      compiler/symdef.pas

+ 8 - 3
compiler/symdef.pas

@@ -6819,19 +6819,24 @@ implementation
     procedure maybeloadcocoatypes;
       var
         tsym: ttypesym;
+        cocoaunit: string[15];
       begin
         if assigned(objc_fastenumeration) then
           exit;
-        tsym:=search_named_unit_globaltype('COCOAALL','NSFASTENUMERATIONPROTOCOL',false);
+        if not(target_info.system in [system_arm_darwin,system_i386_iphonesim]) then
+          cocoaunit:='COCOAALL'
+        else
+          cocoaunit:='IPHONEALL';
+        tsym:=search_named_unit_globaltype(cocoaunit,'NSFASTENUMERATIONPROTOCOL',false);
         if assigned(tsym) then
           objc_fastenumeration:=tobjectdef(tsym.typedef)
         else
           objc_fastenumeration:=nil;
-        tsym:=search_named_unit_globaltype('COCOAALL','NSFASTENUMERATIONSTATE',false);
+        tsym:=search_named_unit_globaltype(cocoaunit,'NSFASTENUMERATIONSTATE',false);
         if assigned(tsym) then
           objc_fastenumerationstate:=trecorddef(tsym.typedef)
         else
-        objc_fastenumerationstate:=nil;
+          objc_fastenumerationstate:=nil;
       end;