#3007 extern "C" typedef incompatibility

obsolete: 8.5a2
closed-fixed
Don Porter
None
9
2004-12-13
2004-12-09
Don Porter
No

The Tcl 8.5a2 release dropped the

extern "C" {
....
}

from tcl.h. When compiling C++
code, this changes the typedefs
in an incompatible way.

For example, previously the
typedef Tcl_DriverCloseProc
was defined as

extern "C" int(*)(void*,Tcl_Interp*)

but now it is defined as

int(*)(void*,Tcl_Interp*)

which has different linkage.

This leads to compiler warnings
and even failure to compile code
that worked fine with older Tcl
releases.

Workaround would be for all
C++ code to wrap its #include's
of tcl.h in extern "C" for itself.

Please restore the extern "C".

Sorry I did not catch this sooner.

Discussion

    • priority: 5 --> 9
     
  • Don Porter
    Don Porter
    2004-12-13

    Logged In: YES
    user_id=80530

    restored.

     
  • Don Porter
    Don Porter
    2004-12-13

    • assigned_to: davygrvy --> dgp
    • status: open --> closed-fixed