@@ -161,6 +161,7 @@ RootCallProc(
161161 * ------------------------------------------------------------------------
162162 */
163163
164+ #if TCL_MAJOR_VERSION > 8
164165#ifndef STRINGIFY
165166# define STRINGIFY (x ) STRINGIFY1(x)
166167# define STRINGIFY1 (x ) #x
@@ -218,6 +219,7 @@ static const char version[] = PACKAGE_VERSION "+" STRINGIFY(ITCL_VERSION_UUID)
218219 ".static"
219220#endif
220221;
222+ #endif /* TCL_MAJOR_VERSION > 8 */
221223
222224static int
223225Initialize (
@@ -234,7 +236,6 @@ Initialize (
234236 Tcl_Class tclCls ;
235237 Tcl_Object clazzObjectPtr , root ;
236238 Tcl_Obj * objPtr , * resPtr ;
237- Tcl_CmdInfo info ;
238239
239240 if (Tcl_InitStubs (interp , "8.6-" , 0 ) == NULL ) {
240241 return TCL_ERROR ;
@@ -460,16 +461,13 @@ Initialize (
460461 * Package is now loaded.
461462 */
462463
463- if (Tcl_GetCommandInfo (interp , "::tcl::build-info" , & info )) {
464464#if TCL_MAJOR_VERSION > 8
465- if (info .isNativeObjectProc == 2 ) {
466- Tcl_CreateObjCommand2 (interp , "::itcl::build-info" ,
467- info .objProc2 , (void * )version , NULL );
468- } else
469- #endif
470- Tcl_CreateObjCommand (interp , "::itcl::build-info" ,
471- info .objProc , (void * )version , NULL );
465+ Tcl_CmdInfo info ;
466+ if (Tcl_GetCommandInfo (interp , "::tcl::build-info" , & info )) {
467+ Tcl_CreateObjCommand2 (interp , "::itcl::build-info" ,
468+ info .objProc2 , (void * )version , NULL );
472469 }
470+ #endif
473471 Tcl_PkgProvideEx (interp , "Itcl" , ITCL_PATCH_LEVEL , & itclStubs );
474472 return Tcl_PkgProvideEx (interp , "itcl" , ITCL_PATCH_LEVEL , & itclStubs );
475473}
0 commit comments