Thread overview
[Issue 1687] New: "extern (C++) interface" and vtbl
Nov 23, 2007
d-bugmail
Nov 23, 2007
d-bugmail
Nov 24, 2007
d-bugmail
Jan 07, 2008
d-bugmail
May 19, 2013
Igor Stepanov
November 23, 2007
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.


-- 

November 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. ***


-- 

November 24, 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.


-- 

January 07, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1687


niqbmozgvx@mailinator.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |major
            Version|unspecified                 |1.026




-- 

May 19, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=1687


Igor Stepanov <wazar.leollone@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wazar.leollone@yahoo.com


--- Comment #3 from Igor Stepanov <wazar.leollone@yahoo.com> 2013-05-19 08:20:35 PDT ---
(In reply to comment #2)
> 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.

PING. Do this issue is invalid?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------