|
@@ -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;
|
|
|
|
|
|
|