<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Am 26.07.2019 um 14:50 schrieb fredvs:<br>
</div>
<blockquote type="cite"
cite="mid:1564145406457-0.post@n5.nabble.com">
<pre class="moz-quote-pre" wrap="">But, imho, there is problem with the behavior of fpc-ptypeinfo and filter in
TParamFlags.
Dont worry, I will not annoy you with this.
</pre>
</blockquote>
There is no problem with PTypeInfo or TParamFlags. The tests for
these functionalities pass without any issues on multiple platforms.<br>
<br>
You should fix the cause (ignoring hidden parameters) and not the
symptoms (hidding "$self"), because the latter will cause you a
headache further down (e.g. if you have a function with an open
array parameter which will have a "$highArgN" parameter for each
open array).<br>
<br>
That said the code I showed you had an issue which might explain the
behaviour you got:<br>
<br>
=== code begin ===<br>
<br>
for int1:= 0 to paramcount - 1 do begin<br>
with params[int1] do begin<br>
<div dir="auto">// replace previous line with:</div>
<div dir="auto"> with params[count] do begin</div>
<div dir="auto">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
flags:= tparamflags(<br>
{$ifdef
mse_fpc_3_2}wordset{$else}byteset{$endif}(pbyte(po1)^));<br>
inc(po1,{$ifdef mse_fpc_3_2}2{$else}1{$endif});<br>
</blockquote>
</div>
</div>
<div dir="auto"><span style="font-family:sans-serif"><br>
// the following code block of mine<br>
{$ifdef mse_fpc_3_2}</span><br>
</div>
<div dir="auto"><span style="font-family:sans-serif"> // skip
hidden parameters ($self, $high, etc.)</span></div>
<div dir="auto"><span style="font-family:sans-serif"> if pfHidden
in flags then</span></div>
<div dir="auto"><span style="font-family:sans-serif"> Continue;</span></div>
<div dir="auto"><span style="font-family:sans-serif"> {$endif}</span><span
style="font-family:sans-serif"><br>
</span></div>
<div dir="auto"><span style="font-family:sans-serif"> Inc(count);<br>
// up until here, needs to be further down (see below)<br>
// so remove this block again<br>
<br>
</span></div>
name:= getshortstring(po1);<br>
typename:= getshortstring(po1);<br>
if (typename = 'WideString') or (typename = 'UnicodeString')
then<br>
begin<br>
typename:= 'msestring';<br>
end<br>
else begin<br>
if typename = 'LongInt' then begin<br>
typename:= 'Integer';<br>
end<br>
else begin<br>
if typename = 'Double' then begin<br>
typename:= 'Real';<br>
end;<br>
end;<br>
end;<br>
end; // I think this is the end of the with-clause<br>
// we adjust the code a little bit as the continue is not needed at
this location<br>
// this way we always increase the count on < 3.2 and only if
it's not hidden<br>
// on >= 3.2; we need to put this at the end so that po1 is
advanced correctly<br>
<span style="font-family:sans-serif">{$ifdef mse_fpc_3_2}</span><br>
<div dir="auto"><span style="font-family:sans-serif"> // skip
hidden parameters ($self, $high, etc.)</span></div>
<div dir="auto"><span style="font-family:sans-serif"> if not
(pfHidden in flags) then</span></div>
<span style="font-family:sans-serif"> {$endif}</span><span
style="font-family:sans-serif"><br>
</span>
<div dir="auto"><span style="font-family:sans-serif"> Inc(count);<br>
</span></div>
end;<br>
<br>
=== code end ===<br>
<br>
This should hopefully solve the issue.<br>
<br>
Regards,<br>
Sven<br>
</body>
</html>