PureBasic Forum
https://www.purebasic.fr/english/

[Done] SizeOf for Interfaces - Compiler crash
https://www.purebasic.fr/english/viewtopic.php?f=4&t=74317
Page 1 of 1

Author:  Josh [ Fri Jan 03, 2020 10:59 pm ]
Post subject:  [Done] SizeOf for Interfaces - Compiler crash

SizeOf works for structure elements, but with interface methods this leads to a compiler crash.

Code:
Debug SizeOf (BITMAP\bmBitsPixel)
;Debug SizeOf (IMAPIForm\DoVerb)

Even if this function is not documented, the compiler shouldn't crash.

Tested with:
Win7
Pb 5.71 x64

Author:  mk-soft [ Sat Jan 04, 2020 1:27 am ]
Post subject:  Re: SizeOf for Interfaces - Compiler crash

Although it makes no sense to query the size of a method address, it should not cause a crash.
Code:
r1 = SizeOf (BITMAP\bmBitsPixel)
r2 = SizeOf (IMAPIForm) / SizeOf(integer)

Debug "Count of Methods = " + r2

Author:  Fred [ Tue Jan 21, 2020 10:38 am ]
Post subject:  Re: SizeOf for Interfaces - Compiler crash

Fixed. Will return sizeof(Integer) now as expected.

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/