* only compare non-hidden parameters when searching for an implementation. The location

of hidden parameters can be different between calling conventions and cause problems
    with delphi mode where the implementation calling convention can be skipped

git-svn-id: trunk@4741 -
This commit is contained in:
peter 2006-09-27 20:53:24 +00:00
parent 2c7bc12ad6
commit 506f44dc7a
3 changed files with 22 additions and 2 deletions

1
.gitattributes vendored
View File

@ -7336,6 +7336,7 @@ tests/webtbs/tw7161.pp svneol=native#text/plain
tests/webtbs/tw7195.pp svneol=native#text/plain
tests/webtbs/tw7227.pp svneol=native#text/plain
tests/webtbs/tw7276.pp svneol=native#text/plain
tests/webtbs/tw7329.pp svneol=native#text/plain
tests/webtbs/tw7372.pp svneol=native#text/plain
tests/webtbs/tw7379.pp svneol=native#text/plain
tests/webtbs/tw7391.pp svneol=native#text/plain

View File

@ -2426,9 +2426,10 @@ const
(pd.maxparacount=0) and
not(po_overload in hd.procoptions)
) or
{ check arguments }
{ check arguments, we need to check only the user visible parameters. The hidden parameters
can be in a different location becuase of the calling convention, eg. L-R vs. R-L order (PFV) }
(
(compare_paras(pd.paras,hd.paras,cp_none,[cpo_comparedefaultvalue])>=te_equal) and
(compare_paras(pd.paras,hd.paras,cp_none,[cpo_comparedefaultvalue,cpo_ignorehidden])>=te_equal) and
{ for operators equal_paras is not enough !! }
((pd.proctypeoption<>potype_operator) or (optoken<>_ASSIGNMENT) or
{ be careful here, equal_defs doesn't take care of unique }

18
tests/webtbs/tw7329.pp Executable file
View File

@ -0,0 +1,18 @@
{$MODE DELPHI}
unit tw7329;
interface
type
IDirect3D9 = interface(IUnknown) end;
// IDirect3D9 = Integer; //todo: Uncomment this line and comment previous one to successfully compile with 2.0.4
function Direct3DCreate9(SDKVersion: LongWord): IDirect3D9; stdcall;
implementation
function Direct3DCreate9(SDKVersion: LongWord): IDirect3D9;
begin
end;
end.