<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>allocate-foreign-object</title><link rel="stylesheet" type="text/css" href="ecl.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="The ECL manual"><link rel="up" href="rn03.html" title="Objects"><link rel="prev" href="rn03.html" title="Objects"><link rel="next" href="rn03re57.html" title="free-foreign-object"></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">allocate-foreign-object</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="rn03.html">Prev</a> </td><th width="60%" align="center">Objects</th><td width="20%" align="right"> <a accesskey="n" href="rn03re57.html">Next</a></td></tr></table><hr></div><div class="refentry" title="allocate-foreign-object"><a name="uffi.allocate-foreign-object"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p><code class="function">allocate-foreign-object</code> — Allocates an instance of a foreign object. </p></div><div class="refsynopsisdiv" title="Macro"><h2>Macro</h2><div class="funcsynopsis"><p><code class="funcdef">(allocate-foreign-object</code> <var class="pdparam">type</var>) ⇒ &optional) ⇒ <var class="pdparam">size</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>type</code></em></span></p></td><td><p>The type of foreign object to allocate. This parameter is evaluated.</p></td></tr><tr><td><p><span class="term"><em class="parameter"><code>size</code></em></span></p></td><td><p>An optional size parameter that is evaluated. If specified, allocates and returns an array of <em class="parameter"><code>type</code></em> that is <em class="parameter"><code>size</code></em> members long. This parameter is evaluated.</p></td></tr><tr><td><p><span class="term">returns</span></p></td><td><p>A pointer to the foreign object.</p></td></tr></tbody></table></div></div><div class="refsect1" title="Description"><a name="id3007483"></a><h2>Description</h2><p>Allocates an instance of a foreign object. It returns a pointer to the object.</p></div><div class="refsect1" title="Examples"><a name="id3007494"></a><h2>Examples</h2><pre class="screen"> (def-struct ab (a :int) (b :double)) (allocate-foreign-object 'ab) => #<ptr></pre></div><div class="refsect1" title="Side Effects"><a name="id3007509"></a><h2>Side Effects</h2><p>None.</p></div><div class="refsect1" title="Affected by"><a name="id3007519"></a><h2>Affected by</h2><p>None.</p></div><div class="refsect1" title="Exceptional Situations"><a name="id3007529"></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="rn03.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="rn03re57.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Objects </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">free-foreign-object</code></td></tr></table></div></body></html>