Hacker News new | ask | show | jobs
by stianan 5209 days ago
I don't immediately see why it would be putting arbitrary data in front of the vtable unless it's done by a person. Do you have any ideas?
1 comments

Perhaps if they posted more examples.. I could see it being useful to put the "data" before the vtable in certain types so that one could simply cast the type to get the value instead of having to call an accessor function. A string type could have the char* as the first member. A linked list could have the data void* as the first member. If they posted a complete list of all the types they have found and which ones had non-standard vtables, it might be easier to make a call on whether it was done by hand or not.