mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-18 23:19:25 +02:00
* fixed tprocvardef.size() for
a) C-blocks: they are equivalent to a voidpointertype, as they are implicit pointer types b) procvardefs created from static class methods (there is no self pointer in this case) o fixes webtbs/tw30936.pp with LLVM git-svn-id: trunk@34977 -
This commit is contained in:
parent
b2e99da3e6
commit
477283031c
@ -6386,9 +6386,13 @@ implementation
|
||||
|
||||
function tprocvardef.size : asizeint;
|
||||
begin
|
||||
if ((po_methodpointer in procoptions) or
|
||||
is_nested_pd(self)) and
|
||||
not(po_addressonly in procoptions) then
|
||||
{ we return false for is_addressonly for a block (because it's not a
|
||||
simple pointer to a function), but they are handled as implicit
|
||||
pointers to a datastructure that contains everything ->
|
||||
voidpointertype.size instead of voidcodepointertype.size }
|
||||
if po_is_block in procoptions then
|
||||
size:=voidpointertype.size
|
||||
else if not is_addressonly then
|
||||
begin
|
||||
if is_nested_pd(self) then
|
||||
size:=voidcodepointertype.size+parentfpvoidpointertype.size
|
||||
|
Loading…
Reference in New Issue
Block a user