SlotFactory_Entry_Create()

Create a new slot factory entry on the heap.

Synopsis:

#include <asr/slot-factory.h>
 
SlotFactory_Entry* SlotFactory_Entry_Create(const char *terminal)

Arguments:

terminal

A pointer to a character buffer containing the terminal to associate with the new entry. The ownership of this memory is retained by the calling context and won't be deleted by the entry structure member functions. If the argument value is NULL, the new entry is created without an associated word buffer.

Library:

libasr

Description:

The SlotFactory_Entry_Create() function is a constructor for slot entries that, optionally given a terminal string, will create a new entry instance. If no terminal string is provided, the word buffer will remain unallocated. This function is primarily defined for use internally. Use the more robust SlotFactory_createUniqueEntry() function instead.

Returns:

A pointer to a newly allocated entry. The ownership of the memory returned by this function is transferred to the calling context, which is responsible for deleting it by calling the SlotFactory_Entry_delete() member function.