<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>deref-pointer</title><link rel="stylesheet" href="ecl.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="The ECL manual"><link rel="up" href="rn03.html" title="Objects"><link rel="prev" href="rn03re60.html" title="pointer-address"><link rel="next" href="rn03re62.html" title="ensure-char-character"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><code class="function">deref-pointer</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="rn03re60.html">Prev</a> </td><th width="60%" align="center">Objects</th><td width="20%" align="right"> <a accesskey="n" href="rn03re62.html">Next</a></td></tr></table><hr></div><div class="refentry" title="deref-pointer"><a name="uffi.deref-pointer"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p><code class="function">deref-pointer</code> — Deferences a pointer. </p></div><div class="refsynopsisdiv" title="Macro"><h2>Macro</h2><div class="funcsynopsis"><p><code class="funcdef">(deref-pointer</code> <var class="pdparam">ptr</var>) ⇒ <var class="pdparam">type</var>)</p></div><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>ptr</code></em></span></p></td><td><p>A pointer to a foreign object.</p></td></tr><tr><td><p><span class="term"><em class="parameter"><code>type</code></em></span></p></td><td><p>A foreign type of the object being pointed to.</p></td></tr><tr><td><p><span class="term">returns</span></p></td><td><p>The value of the object where the pointer points.</p></td></tr></tbody></table></div></div><div class="refsect1" title="Description"><a name="id690238"></a><h2>Description</h2><p> Returns the object to which a pointer points.</p></div><div class="refsect1" title="Examples"><a name="id690249"></a><h2>Examples</h2><p> </p><pre class="screen"> (let ((intp (allocate-foreign-object :int))) (setf (deref-pointer intp :int) 10) (prog1 (deref-pointer intp :int) (free-foreign-object intp))) => 10</pre></div><div class="refsect1" title="Notes"><a name="id690265"></a><h2>Notes</h2><p> The TYPE argument is ignored for CL implementations other than AllegroCL. If you want to cast a pointer to another type use WITH-CAST-POINTER together with DEREF-POINTER/DEREF-ARRAY.</p></div><div class="refsect1" title="Side Effects"><a name="id690276"></a><h2>Side Effects</h2><p>None.</p></div><div class="refsect1" title="Affected by"><a name="id690287"></a><h2>Affected by</h2><p>None.</p></div><div class="refsect1" title="Exceptional Situations"><a name="id690297"></a><h2>Exceptional Situations</h2><p>None.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="rn03re60.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="rn03.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="rn03re62.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">pointer-address</code> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <code class="function">ensure-char-character</code></td></tr></table></div></body></html>