{The S-lang C Library Reference}: SLclass_allocate_class

Next Previous Contents

## 40. SLclass_allocate_class

Synopsis

  Allocate a class for a new data type

Usage

  `SLang_Class_Type *SLclass_allocate_class (char *name)`

Description

  The purpose of this function is to allocate and initialize space that defines a new data type or class called `name`. If successful, a pointer to the class is returned, or upon failure the function returns `NULL`.

  This function does not automatically create the new data type. Callback functions must first be associated with the data type via functions such as `SLclass_set_push_function`, and the the data type must be registered with the interpreter via `SLclass_register_class`. See the S-lang library programmer's guide for more information.

See Also

  `SLclass_register_class, SLclass_set_push_function`

Next Previous Contents