d     Tcl_DecrRefCount(Tcl_Obj *obj);
int      Tcl_IsShared(Tcl_Obj *obj);
</pre>
</div>

<H3><a name="Tcl_nn41">37.7.7 Standard  typemaps</a></H3>


<p>
The following typemaps show how to convert a few common kinds of
objects between Tcl and C (and to give a better idea of how typemaps
work)
</p>


<p>
<b>Integer conversion</b>
</p>

<div class="code">
<pre>
%typemap(in) int, short, long {
  int temp;
  if (Tcl_GetIntFromObj(interp, $input, &amp;temp) == TCL_ERROR)
    return TCL_ERROR;
  $1 = ($1_ltype) t