Tcl_GetVersion(3tcl)

Tcl_GetVersion3tcl

Get the version of the library at runtime

Usage

#include <tcl.h>

Tcl_GetVersion(major, minor, patchLevel, type)

    


    

Arguments

int *major (out)

Major version number of the Tcl library.

int *minor (out)

Minor version number of the Tcl library.

int *patchLevel (out)

The patch level of the Tcl library (or alpha or beta number).

Tcl_ReleaseType *type (out)

The type of release, also indicates the type of patch level. Can be one of TCL_ALPHA_RELEASE, TCL_BETA_RELEASE, or TCL_FINAL_RELEASE.


    


            

Overview

Tcl_GetVersion should be used to query the version number of the Tcl library at runtime. This is useful when using a dynamically loaded Tcl library or when writing a stubs-aware extension. For instance, if you write an extension that is linked against the Tcl stubs library, it could be loaded into a program linked to an older version of Tcl than you expected. Use Tcl_GetVersion to verify that fact, and possibly to change the behavior of your extension.

Tcl_GetVersion accepts NULL for any of the arguments. For instance if you do not care about the patchLevel of the library, pass a NULL for the patchLevel argument.

Keywords

version, patchlevel, major, minor, alpha, beta, release

Releases

13 releases since Debian 2.2 (Potato); the text changed 4 times.

  1. 2.2
  2. 3.0–4.0
  3. 5.0–7
  4. 8
  5. 9–13

From tcl8.6-doc 8.6.16+dfsg-1 in Debian 13 (Trixie). Also shipped by tcl9.0-doc. Parsed by carta from the page's man source.