* added pocall_mwpascal to cdecl_pocalls so we no longer have to explicitly

add it everywhere in the paramanagers (where it was often forgotten)
  - removed places where it was explicitly added to cdecl_pocalls checks
  + test

git-svn-id: trunk@22616 -
This commit is contained in:
Jonas Maebe 2012-10-12 08:41:03 +00:00
parent b0a984086f
commit 614436d8cb
4 changed files with 19 additions and 2 deletions

1
.gitattributes vendored
View File

@ -10369,6 +10369,7 @@ tests/test/packages/fcl-xml/tw22495.pp svneol=native#text/plain
tests/test/packages/fcl-xml/uw22495.pp svneol=native#text/plain
tests/test/packages/hash/sha1test.pp svneol=native#text/plain
tests/test/packages/hash/tmdtest.pp svneol=native#text/plain
tests/test/packages/univint/tcgrectmake.pp svneol=native#text/plain
tests/test/packages/webtbs/tw10045.pp svneol=native#text/plain
tests/test/packages/webtbs/tw11142.pp svneol=native#text/plain
tests/test/packages/webtbs/tw11570.pp svneol=native#text/plain

View File

@ -193,7 +193,7 @@ unit cpupara;
result:=false
else
result:=
(not(calloption in (cdecl_pocalls+[pocall_mwpascal])) and
(not(calloption in (cdecl_pocalls)) and
(def.size>sizeof(aint))) or
(((calloption = pocall_mwpascal) or (target_info.system=system_i386_wince)) and
(varspez=vs_const));

View File

@ -3309,7 +3309,7 @@ if (target_info.abi = abi_eabihf) then
Option:=nil;
clearstack_pocalls := [pocall_cdecl,pocall_cppdecl,pocall_syscall,pocall_mwpascal];
cdecl_pocalls := [pocall_cdecl, pocall_cppdecl];
cdecl_pocalls := [pocall_cdecl, pocall_cppdecl, pocall_mwpascal];
if (tf_safecall_clearstack in target_info.flags) then
begin
include (cdecl_pocalls, pocall_safecall);

View File

@ -0,0 +1,16 @@
{ %target=darwin }
program test;
uses
MacOSAll;
procedure Callback (data: ptr; context: ptr); mwpascal;
begin
end;
var
arr: CFMutableArrayRef;
begin
arr := CFArrayCreateMutable(nil, 0, @kCFTypeArrayCallBacks);
CFArrayApplyFunction(arr, CFRangeMake(0, CFArrayGetCount(arr)), CFArrayApplierFunction(@Callback), nil);
end.