get size of function
maarten van damme
maartenvd1994 at gmail.com
Wed Aug 31 01:15:10 PDT 2011
substracting the pointers to two sequential functions didn't work out. the
following snippet:
//
auto first=function void(){
asm{
naked;
nop;
}
};
auto next=function void(){
asm{
naked;
nop;
}
};
writeln(cast(int)&next-cast(int)&first,"/",cast(int)&next,"/",&next,"/",cast(int)&first,"/",&first);
//
outputs
4/1244672/12FE00/1244668/12FDFC
so the conversions from hex to int work correctly and I still get a size of
4 while it shouldve been a size of 1.
Are there other options?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20110831/01e3e84b/attachment.html>
More information about the Digitalmars-d-learn
mailing list