Atrinik Server  4.0
Functions | Variables
links.c File Reference
#include <global.h>
#include <toolkit/string.h>
#include <object.h>

Go to the source code of this file.

Functions

static void objectlink_debugger (objectlink *ol, char *buf, size_t size)
 
void objectlink_init (void)
 
void objectlink_deinit (void)
 
objectlinkget_objectlink (void)
 
void free_objectlink (objectlink *ol)
 
static void free_objectlink_recursive (objectlink *ol)
 
void free_objectlinkpt (objectlink *obp)
 
objectlinkobjectlink_link (objectlink **startptr, objectlink **endptr, objectlink *afterptr, objectlink *beforeptr, objectlink *objptr)
 
objectlinkobjectlink_unlink (objectlink **startptr, objectlink **endptr, objectlink *objptr)
 

Variables

mempool_struct * pool_objectlink
 

Detailed Description

Object link related functions.

Definition in file links.c.

Function Documentation

void free_objectlink ( objectlink ol)

Free an object link.

Parameters
olObject link to free.

Definition at line 84 of file links.c.

static void free_objectlink_recursive ( objectlink ol)
static

Recursively free all objectlinks.

Parameters
olThe objectlink.

Definition at line 98 of file links.c.

void free_objectlinkpt ( objectlink obp)

Recursively free all linked lists of objectlink pointers

Warning
Only call for lists with FLAG_IS_LINKED - friendly lists and some others handle their own objectlink malloc/free.
Parameters
obpThe oblinkpt

Definition at line 118 of file links.c.

objectlink* get_objectlink ( void  )

Allocate a new objectlink structure and initialize it.

Returns
Pointer to the new objectlink

Definition at line 72 of file links.c.

static void objectlink_debugger ( objectlink ol,
char *  buf,
size_t  size 
)
static

Definition at line 40 of file links.c.

void objectlink_deinit ( void  )

Deinitialize the objectlink API.

Definition at line 63 of file links.c.

void objectlink_init ( void  )

Initialize the objectlink API.

Definition at line 53 of file links.c.

objectlink* objectlink_link ( objectlink **  startptr,
objectlink **  endptr,
objectlink afterptr,
objectlink beforeptr,
objectlink objptr 
)

Generic link function for object links.

Definition at line 134 of file links.c.

objectlink* objectlink_unlink ( objectlink **  startptr,
objectlink **  endptr,
objectlink objptr 
)

Unlink object link from a list.

Definition at line 187 of file links.c.

Variable Documentation

mempool_struct* pool_objectlink

Objectlink memory pool.

Definition at line 37 of file links.c.