Sophie

Sophie

distrib > Mandriva > 8.1 > i586 > by-pkgid > 700475c8ae73fb4d57b6df4485c29e1c > files > 94

slang-doc-1.4.4-2mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
 <TITLE> {The S-lang C Library Reference}: SLclass_allocate_class</TITLE>
 <LINK HREF="cref-41.html" REL=next>
 <LINK HREF="cref-39.html" REL=previous>
 <LINK HREF="cref.html#toc40" REL=contents>
</HEAD>
<BODY>
<A HREF="cref-41.html">Next</A>
<A HREF="cref-39.html">Previous</A>
<A HREF="cref.html#toc40">Contents</A>
<HR>
<H2><A NAME="SLclass_allocate_class"></A> <A NAME="s40">40. <B>SLclass_allocate_class</B></A></H2>

<P>
<DL>
<DT><B> Synopsis </B><DD><P>Allocate a class for a new data type
<DT><B> Usage </B><DD><P><CODE>SLang_Class_Type *SLclass_allocate_class (char *name)</CODE>
<DT><B> Description </B><DD><P>The purpose of this function is to allocate and initialize space
that defines a new data type or class called <CODE>name</CODE>.  If
successful, a pointer to the class is returned, or upon failure the
function returns <CODE>NULL</CODE>.
<P>This function does not automatically create the new data type.
Callback functions must first be associated with the data type via
functions such as <CODE>SLclass_set_push_function</CODE>, and the the data
type must be registered with the interpreter via
<CODE>SLclass_register_class</CODE>.  See the <B>S-lang</B> library programmer's
guide for more information.
<DT><B> See Also </B><DD><P><CODE>SLclass_register_class, SLclass_set_push_function</CODE>
</DL>
<P>
<P>
<P>
<HR>
<A HREF="cref-41.html">Next</A>
<A HREF="cref-39.html">Previous</A>
<A HREF="cref.html#toc40">Contents</A>
</BODY>
</HTML>