Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: ad9a64924f54ba543b0148f44314185ec4ee84a6
Ticket: 218184ffffffffffffffffffffffffffffffffff
Double inclusion of C++ wrappers
User & Date: nobody on 2000-10-26 00:54:15
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 2341 Bug
    Version: 8.1.1
    SubmitDate: '1999-07-07'
    LastModified: '2000-01-25'
    Severity: LOW
    Status: Closed
    Submitter: techsupp
    ChangedBy: hobbs
    OS: Other
    Machine: NA
    FixedDate: '2000-10-25'
    ClosedDate: '2000-01-25'
    
    
    Name:
    
    Jan Nijtmans
    
    
    Comments:
    
    The header file patches are included to demonstrate the effect of the
    
        tool modification. "make genstubs" has the same effect.
    
    
    ReproducibleScript:
    
    When using "make genstubs", the generated header files contain something
    
        like:
    
        #ifdef __cplusplus
    
        extern "C" {
    
        #endif
    
        extern TclStubs *tclStubsPtr;
    
        #ifdef __cplusplus
    
        }
    
        #endif
    
    
        This wrapper doesn't serve any function, because
    
        tcl.h contains it already. Further on, the
    
        USE_TCL_STUB_PROCS macro doesn't serve any
    
        function as well, so could as well be removed.
    
    
    Patch:
    
    *** tools/genStubs.tcl.origTue Jul  6 21:53:47 1999
    
    --- tools/genStubs.tclTue Jul  6 21:58:22 1999
    
    ***************
    
    *** 679,690 ****
    
          upvar $textVar text
    
    
          set upName [string toupper $libraryName]
    
    !     append text "\n#if defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS)\n"
    
          append text "\n/*\n * Inline function declarations:\n */\n\n"
    
    
          forAllStubs $name makeMacro 0 text
    
    
    !     append text "\n#endif /* defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS) */\n"
    
          return
    
      }
    
    
    --- 679,690 ----
    
          upvar $textVar text
    
    
          set upName [string toupper $libraryName]
    
    !     append text "\n#if defined(USE_${upName}_STUBS)\n"
    
          append text "\n/*\n * Inline function declarations:\n */\n\n"
    
    
          forAllStubs $name makeMacro 0 text
    
    
    !     append text "\n#endif /* defined(USE_${upName}_STUBS) */\n"
    
          return
    
      }
    
    
    ***************
    
    *** 725,733 ****
    
    
          append text "} ${capName}Stubs;\n"
    
    
    !     append text "\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n"
    
    !     append text "extern ${capName}Stubs *${name}StubsPtr;\n"
    
    !     append text "#ifdef __cplusplus\n}\n#endif\n"
    
    
          emitMacros $name text
    
    
    --- 725,731 ----
    
    
          append text "} ${capName}Stubs;\n"
    
    
    !     append text "\nextern ${capName}Stubs *${name}StubsPtr;\n"
    
    
          emitMacros $name text
    
    
    *** generic/tclDecls.h.origTue Jul  6 21:53:04 1999
    
    --- generic/tclDecls.hTue Jul  6 21:58:53 1999
    
    ***************
    
    *** 1653,1667 ****
    
          int (*tcl_RegExpMatchObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * stringObj, Tcl_Obj * patternObj)); /* 385 */
    
      } TclStubs;
    
    
    - #ifdef __cplusplus
    
    - extern "C" {
    
    - #endif
    
      extern TclStubs *tclStubsPtr;
    
    - #ifdef __cplusplus
    
    - }
    
    - #endif
    
    
    ! #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
    
    
      /*
    
       * Inline function declarations:
    
    --- 1653,1661 ----
    
          int (*tcl_RegExpMatchObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * stringObj, Tcl_Obj * patternObj)); /* 385 */
    
      } TclStubs;
    
    
      extern TclStubs *tclStubsPtr;
    
    
    ! #if defined(USE_TCL_STUBS)
    
    
      /*
    
       * Inline function declarations:
    
    ***************
    
    *** 3232,3238 ****
    
      (tclStubsPtr->tcl_RegExpMatchObj) /* 385 */
    
      #endif
    
    
    ! #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
    
    
      /* !END!: Do not edit above this line. */
    
    
    --- 3226,3232 ----
    
      (tclStubsPtr->tcl_RegExpMatchObj) /* 385 */
    
      #endif
    
    
    ! #endif /* defined(USE_TCL_STUBS) */
    
    
      /* !END!: Do not edit above this line. */
    
    
    *** tclIntDecls.h.origTue Jul  6 21:52:55 1999
    
    --- tclIntDecls.hTue Jul  6 21:58:56 1999
    
    ***************
    
    *** 673,687 ****
    
          struct AuxDataType * (*tclGetAuxDataType) _ANSI_ARGS_((char * typeName)); /* 145 */
    
      } TclIntStubs;
    
    
    - #ifdef __cplusplus
    
    - extern "C" {
    
    - #endif
    
      extern TclIntStubs *tclIntStubsPtr;
    
    - #ifdef __cplusplus
    
    - }
    
    - #endif
    
    
    ! #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
    
    
      /*
    
       * Inline function declarations:
    
    --- 673,681 ----
    
          struct AuxDataType * (*tclGetAuxDataType) _ANSI_ARGS_((char * typeName)); /* 145 */
    
      } TclIntStubs;
    
    
      extern TclIntStubs *tclIntStubsPtr;
    
    
    ! #if defined(USE_TCL_STUBS)
    
    
      /*
    
       * Inline function declarations:
    
    ***************
    
    *** 1265,1271 ****
    
      (tclIntStubsPtr->tclGetAuxDataType) /* 145 */
    
      #endif
    
    
    ! #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
    
    
      /* !END!: Do not edit above this line. */
    
    
    --- 1259,1265 ----
    
      (tclIntStubsPtr->tclGetAuxDataType) /* 145 */
    
      #endif
    
    
    ! #endif /* defined(USE_TCL_STUBS) */
    
    
      /* !END!: Do not edit above this line. */
    
    
    *** tclIntPlatDecls.h.origTue Jul  6 21:53:28 1999
    
    --- tclIntPlatDecls.hTue Jul  6 21:58:57 1999
    
    ***************
    
    *** 268,282 ****
    
      #endif /* MAC_TCL */
    
      } TclIntPlatStubs;
    
    
    - #ifdef __cplusplus
    
    - extern "C" {
    
    - #endif
    
      extern TclIntPlatStubs *tclIntPlatStubsPtr;
    
    - #ifdef __cplusplus
    
    - }
    
    - #endif
    
    
    ! #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
    
    
      /*
    
       * Inline function declarations:
    
    --- 268,276 ----
    
      #endif /* MAC_TCL */
    
      } TclIntPlatStubs;
    
    
      extern TclIntPlatStubs *tclIntPlatStubsPtr;
    
    
    ! #if defined(USE_TCL_STUBS)
    
    
      /*
    
       * Inline function declarations:
    
    ***************
    
    *** 518,524 ****
    
      #endif
    
      #endif /* MAC_TCL */
    
    
    ! #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
    
    
      /* !END!: Do not edit above this line. */
    
    
    --- 512,518 ----
    
      #endif
    
      #endif /* MAC_TCL */
    
    
    ! #endif /* defined(USE_TCL_STUBS) */
    
    
      /* !END!: Do not edit above this line. */
    
    
    *** tclPlatDecls.h.origTue Jul  6 21:53:15 1999
    
    --- tclPlatDecls.hTue Jul  6 21:58:57 1999
    
    ***************
    
    *** 80,94 ****
    
      #endif /* MAC_TCL */
    
      } TclPlatStubs;
    
    
    - #ifdef __cplusplus
    
    - extern "C" {
    
    - #endif
    
      extern TclPlatStubs *tclPlatStubsPtr;
    
    - #ifdef __cplusplus
    
    - }
    
    - #endif
    
    
    ! #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
    
    
      /*
    
       * Inline function declarations:
    
    --- 80,88 ----
    
      #endif /* MAC_TCL */
    
      } TclPlatStubs;
    
    
      extern TclPlatStubs *tclPlatStubsPtr;
    
    
    ! #if defined(USE_TCL_STUBS)
    
    
      /*
    
       * Inline function declarations:
    
    ***************
    
    *** 143,149 ****
    
      #endif
    
      #endif /* MAC_TCL */
    
    
    ! #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
    
    
      /* !END!: Do not edit above this line. */
    
    
    --- 137,143 ----
    
      #endif
    
      #endif /* MAC_TCL */
    
    
    ! #endif /* defined(USE_TCL_STUBS) */
    
    
      /* !END!: Do not edit above this line. */
    
    
    PatchFiles:
    
    genStubs.tcl tclDecls.h tclIntDecls.h tclPlatDecls.h tclIntPlatDecls.h
    
    
    
    
    This is not quite correct because headers like tclUnixPort.h that
    includes tclPlatDecls.h doesn't do any extern "C" on its own.  This
    doesn't cause any harm, so its best not to potentially break anything. 
    -- 01/25/2000 hobbs
    
  4. foundin changed to: "final: 8.1.1"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "75. Tutorial"
  10. title changed to: "Double inclusion of C++ wrappers"
  11. type changed to: "Bug"