| 1 |
'\" |
| 2 |
'\" Copyright (c) 1999 Scriptics Corporation |
| 3 |
'\" |
| 4 |
'\" See the file "license.terms" for information on usage and redistribution |
| 5 |
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
| 6 |
'\" |
| 7 |
.TH Tcl_GetVersion 3 7.5 Tcl "Tcl Library Procedures" |
| 8 |
.so man.macros |
| 9 |
.BS |
| 10 |
.SH NAME |
| 11 |
Tcl_GetVersion \- get the version of the library at runtime |
| 12 |
.SH SYNOPSIS |
| 13 |
.nf |
| 14 |
\fB#include <tcl.h>\fR |
| 15 |
.sp |
| 16 |
\fBTcl_GetVersion\fR(\fImajor, minor, patchLevel, type\fR) |
| 17 |
.SH ARGUMENTS |
| 18 |
.AS Tcl_ReleaseType *patchLevel out |
| 19 |
.AP int *major out |
| 20 |
Major version number of the Tcl library. |
| 21 |
.AP int *minor out |
| 22 |
Minor version number of the Tcl library. |
| 23 |
.AP int *patchLevel out |
| 24 |
The patch level of the Tcl library (or alpha or beta number). |
| 25 |
.AP Tcl_ReleaseType *type out |
| 26 |
The type of release, also indicates the type of patch level. Can be |
| 27 |
one of \fBTCL_ALPHA_RELEASE\fR, \fBTCL_BETA_RELEASE\fR, or |
| 28 |
\fBTCL_FINAL_RELEASE\fR. |
| 29 |
.BE |
| 30 |
|
| 31 |
.SH DESCRIPTION |
| 32 |
.PP |
| 33 |
\fBTcl_GetVersion\fR should be used to query the version number |
| 34 |
of the Tcl library at runtime. This is useful when using a |
| 35 |
dynamically loaded Tcl library or when writing a stubs-aware |
| 36 |
extension. For instance, if you write an extension that is |
| 37 |
linked against the Tcl stubs library, it could be loaded into |
| 38 |
a program linked to an older version of Tcl than you expected. |
| 39 |
Use \fBTcl_GetVersion\fR to verify that fact, and possibly to |
| 40 |
change the behavior of your extension. |
| 41 |
.PP |
| 42 |
\fBTcl_GetVersion\fR accepts NULL for any of the arguments. For instance if |
| 43 |
you do not care about the \fIpatchLevel\fR of the library, pass |
| 44 |
a NULL for the \fIpatchLevel\fR argument. |
| 45 |
|
| 46 |
.SH KEYWORDS |
| 47 |
version, patchlevel, major, minor, alpha, beta, release |
| 48 |
|