\documentclass[]{article}
\usepackage{amsmath,graphicx,supertabular,hyperref,tabularx,ifthen}
\title{TIP \#254: New Types for Tcl\_LinkVar}
\date{July 21, 2005}
\author{Rene Meyer}
\urlstyle{sf}
\setlength{\parskip}{1ex}
\setlength{\parindent}{0pt}
\def\tipversion$#1${\texttt{\$#1\$}}
\def\tiplangle#1{\ensuremath{<}}
\def\tiprangle#1{\ensuremath{>}}
\def\tipbar#1{\ensuremath{|}}
\def\tipmail#1#2{\(\langle\){\small\expandafter\url{#1@#2}}\(\rangle\)}
\ifx\pdfoutput\undefined
\newcommand{\tipimage}[2]{\typeout{Make sure you download #1.eps}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.eps}}{\includegraphics[width=0.8\textwidth]{#1.eps}}}
\newcommand{\tipxref}[1]{}
\newcommand{\tipxrefend}{}
\else
\newcommand{\tipimage}[2]{\typeout{Make sure you create #1.pdf}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.pdf}}{\includegraphics[width=0.8\textwidth]{#1.pdf}}}
\pdfcatalog{/PageMode /UseOutlines}
\newcommand{\tipxref}[1]{\pdfannotlink attr {/C [0.5 0.5 1.0] /Border [0 0 1]} goto name {#1}}
\newcommand{\tipxrefend}{\pdfendlink}
\fi
\newenvironment{tipabstract}{\begin{abstract}}{\end{abstract}}
\begin{document}\maketitle
\begin{center}\begin{tabularx}{\linewidth}{|r@{: }X|}\hline
\textbf{TIP \#254}&\textbf{New Types for Tcl\_LinkVar}\\\hline
Author&

Rene Meyer \tipmail{rene.meyer}{sturmit.de}
\\
Created&Thursday, \(\text{21}^{\text{st}}\) July 2005\\
Type&Project\\
Tcl Version&\(8.5\)\\
State&Final\\
Vote&Done\\
Version&\tipversion$Revision: 1.6 $\\
Post History&\\
\hline\end{tabularx}\end{center}
\thispagestyle{empty}\pagestyle{empty}
\begin{tipabstract}

Currently only a limited set of types of C variable may be linked to using Tcl\_LinkVar. This TIP proposes extending this to cover all the basic numeric C types.
\end{tipabstract}
\tableofcontents\setcounter{page}{0}\clearpage\pagestyle{plain}

\section{Rationale}

With the current implementation it is not possible to link the following types directly to a Tcl variable, making it much more difficult to couple such variables to the Tcl level (compared with \textbf{int} or \textbf{double} variables). This TIP fixes this, making it easier to link C variables and embedded Tcl code.
\begin{itemize}
\item{}
\textbf{char}
\item{}
\textbf{unsigned char}
\item{}
\textbf{short}
\item{}
\textbf{unsigned short}
\item{}
\textbf{unsigned int}
\item{}
\textbf{long}
\item{}
\textbf{unsigned long}
\item{}
\textbf{Tcl\_WideUInt}
\item{}
\textbf{float}
\end{itemize}

There will be no impact on current applications.

\section{Specification}

The new types are inserted as new \textbf{\#define TCL\_LINK\_*} statements in the \textit{tcl.h} header file and in the \textbf{switch} statements in the \textit{Tcl\_Link} functions.

The documentation of \textit{Tcl\_*Link*} should mention the new types.

\section{Reference Implementation}

A reference implementation is available as Patch \#1242844 on SourceForge[\url{http://sf.net/support/tracker.php?aid=1242844}].

\section{Copyright}

This document has been placed in the public domain.

\section{Colophon}

\textit{TIP AutoGenerator --- written by Donal K. Fellows}
\end{document}
