digitalmars.D.bugs - [Issue 1687] New: "extern (C++) interface" and vtbl
- d-bugmail puremagic.com Nov 23 2007
- d-bugmail puremagic.com Nov 23 2007
- d-bugmail puremagic.com Nov 24 2007
- d-bugmail puremagic.com Jan 07 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1687 Summary: "extern (C++) interface" and vtbl Product: D Version: unspecified Platform: PC OS/Version: Windows Status: NEW Severity: normal Priority: P3 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: niqbmozgvx mailinator.com cpp_interface.html:a D interface with the attribute of extern (C++) will have a virtual function pointer table (vtbl[]) that exactly matches C++'s [...] in C++ the first entry points to the first virtual function.
extern (C++) interface A { void foo(); void bar(); } A a = ...; So calling a.foo() should call vtbl[0], instead D calls vtbl[1] as if it where a normal D interface. --
Nov 23 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1687 ------- Comment #1 from niqbmozgvx mailinator.com 2007-11-23 11:08 ------- *** Bug 1688 has been marked as a duplicate of this bug. *** --
Nov 23 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1687 ------- Comment #2 from niqbmozgvx mailinator.com 2007-11-24 03:08 ------- BTW this functionality of an interface, in which the slot 0 of the vtable[] is NOT used by a ClassInfo pointer, is needed for a lot of interfaces in the windows header files which are NOT derived from IUnknown. Mainly the whole DirectX 10 part. --
Nov 24 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1687 niqbmozgvx mailinator.com changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major Version|unspecified |1.026 --
Jan 07 2008









d-bugmail puremagic.com 