gwenhywfar 5.10.1
Macros | Functions
simpleptrlist.c File Reference
#include "simpleptrlist_p.h"
#include <gwenhywfar/debug.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include "simpleptrlist-t.c"
Include dependency graph for simpleptrlist.c:

Go to the source code of this file.

Macros

#define DISABLE_DEBUGLOG
 

Functions

static void _attachToAllObjects (GWEN_SIMPLEPTRLIST *pl)
 
static void _attachToObject (GWEN_SIMPLEPTRLIST *pl, void *p)
 
static void _attachToPtrList (INTERNAL_PTRLIST *entries)
 
static INTERNAL_PTRLIST * _copyPtrList (const INTERNAL_PTRLIST *oldEntries, uint64_t totalEntries)
 
static void _detachFromAllObjects (GWEN_SIMPLEPTRLIST *pl)
 
static void _detachFromObject (GWEN_SIMPLEPTRLIST *pl, void *p)
 
static void _freePtrList (INTERNAL_PTRLIST *entries)
 
static INTERNAL_PTRLIST * _mallocPtrList (uint64_t totalEntries)
 
static INTERNAL_PTRLIST * _reallocPtrList (INTERNAL_PTRLIST *oldEntries, uint64_t totalEntries)
 
void GWEN_SimplePtrList_AddFlags (GWEN_SIMPLEPTRLIST *pl, uint32_t f)
 
int64_t GWEN_SimplePtrList_AddPtr (GWEN_SIMPLEPTRLIST *pl, void *p)
 
void GWEN_SimplePtrList_Attach (GWEN_SIMPLEPTRLIST *pl)
 
void GWEN_SimplePtrList_Clear (GWEN_SIMPLEPTRLIST *pl)
 
int GWEN_SimplePtrList_DecUserCounter (GWEN_SIMPLEPTRLIST *pl)
 
int GWEN_SimplePtrList_EnsureWritability (GWEN_SIMPLEPTRLIST *pl)
 
void GWEN_SimplePtrList_free (GWEN_SIMPLEPTRLIST *pl)
 
void * GWEN_SimplePtrList_GetEntries (const GWEN_SIMPLEPTRLIST *pl)
 
uint32_t GWEN_SimplePtrList_GetFlags (const GWEN_SIMPLEPTRLIST *pl)
 
uint64_t GWEN_SimplePtrList_GetMaxEntries (const GWEN_SIMPLEPTRLIST *pl)
 
void * GWEN_SimplePtrList_GetPtrAt (const GWEN_SIMPLEPTRLIST *pl, uint64_t idx)
 
uint64_t GWEN_SimplePtrList_GetSteps (const GWEN_SIMPLEPTRLIST *pl)
 
uint64_t GWEN_SimplePtrList_GetUsedEntries (const GWEN_SIMPLEPTRLIST *pl)
 
uint64_t GWEN_SimplePtrList_GetUserCounter (const GWEN_SIMPLEPTRLIST *pl)
 
int GWEN_SimplePtrList_GetUserIntData (const GWEN_SIMPLEPTRLIST *pl)
 
void GWEN_SimplePtrList_IncUserCounter (GWEN_SIMPLEPTRLIST *pl)
 
GWEN_SIMPLEPTRLISTGWEN_SimplePtrList_LazyCopy (GWEN_SIMPLEPTRLIST *oldList)
 
GWEN_SIMPLEPTRLISTGWEN_SimplePtrList_new (uint64_t startEntries, uint64_t steps)
 
GWEN_SIMPLEPTRLIST_ATTACHOBJECT_FN GWEN_SimplePtrList_SetAttachObjectFn (GWEN_SIMPLEPTRLIST *pl, GWEN_SIMPLEPTRLIST_ATTACHOBJECT_FN fn)
 
void GWEN_SimplePtrList_SetFlags (GWEN_SIMPLEPTRLIST *pl, uint32_t f)
 
GWEN_SIMPLEPTRLIST_FREEOBJECT_FN GWEN_SimplePtrList_SetFreeObjectFn (GWEN_SIMPLEPTRLIST *pl, GWEN_SIMPLEPTRLIST_FREEOBJECT_FN fn)
 
int GWEN_SimplePtrList_SetPtrAt (GWEN_SIMPLEPTRLIST *pl, uint64_t idx, void *p)
 
void GWEN_SimplePtrList_SetSteps (GWEN_SIMPLEPTRLIST *pl, uint64_t steps)
 
void GWEN_SimplePtrList_SetUserCounter (GWEN_SIMPLEPTRLIST *pl, uint64_t i)
 
void GWEN_SimplePtrList_SetUserIntData (GWEN_SIMPLEPTRLIST *pl, int i)
 
void GWEN_SimplePtrList_SubFlags (GWEN_SIMPLEPTRLIST *pl, uint32_t f)
 

Macro Definition Documentation

◆ DISABLE_DEBUGLOG

#define DISABLE_DEBUGLOG

Definition at line 29 of file simpleptrlist.c.

Function Documentation

◆ _attachToAllObjects()

void _attachToAllObjects ( GWEN_SIMPLEPTRLIST pl)
static

Definition at line 448 of file simpleptrlist.c.

References _attachToObject(), DBG_ERROR, DBG_VERBOUS, GWEN_LOGDOMAIN, and NULL.

Referenced by GWEN_SimplePtrList_EnsureWritability().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _attachToObject()

void _attachToObject ( GWEN_SIMPLEPTRLIST pl,
void *  p 
)
static

Definition at line 432 of file simpleptrlist.c.

Referenced by _attachToAllObjects(), GWEN_SimplePtrList_AddPtr(), and GWEN_SimplePtrList_SetPtrAt().

Here is the caller graph for this function:

◆ _attachToPtrList()

void _attachToPtrList ( INTERNAL_PTRLIST *  entries)
static

Definition at line 513 of file simpleptrlist.c.

References DBG_ERROR, DBG_VERBOUS, and GWEN_LOGDOMAIN.

Referenced by GWEN_SimplePtrList_LazyCopy().

Here is the caller graph for this function:

◆ _copyPtrList()

INTERNAL_PTRLIST * _copyPtrList ( const INTERNAL_PTRLIST *  oldEntries,
uint64_t  totalEntries 
)
static

Definition at line 579 of file simpleptrlist.c.

References DBG_ERROR, DBG_VERBOUS, GWEN_LOGDOMAIN, and NULL.

Referenced by GWEN_SimplePtrList_EnsureWritability().

Here is the caller graph for this function:

◆ _detachFromAllObjects()

void _detachFromAllObjects ( GWEN_SIMPLEPTRLIST pl)
static

Definition at line 469 of file simpleptrlist.c.

References _detachFromObject(), DBG_ERROR, DBG_VERBOUS, GWEN_LOGDOMAIN, and NULL.

Referenced by GWEN_SimplePtrList_Clear(), and GWEN_SimplePtrList_free().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _detachFromObject()

void _detachFromObject ( GWEN_SIMPLEPTRLIST pl,
void *  p 
)
static

Definition at line 440 of file simpleptrlist.c.

Referenced by _detachFromAllObjects(), and GWEN_SimplePtrList_SetPtrAt().

Here is the caller graph for this function:

◆ _freePtrList()

void _freePtrList ( INTERNAL_PTRLIST *  entries)
static

Definition at line 527 of file simpleptrlist.c.

References DBG_VERBOUS, and GWEN_LOGDOMAIN.

Referenced by GWEN_SimplePtrList_EnsureWritability(), and GWEN_SimplePtrList_free().

Here is the caller graph for this function:

◆ _mallocPtrList()

INTERNAL_PTRLIST * _mallocPtrList ( uint64_t  totalEntries)
static

Definition at line 493 of file simpleptrlist.c.

References DBG_ERROR, DBG_VERBOUS, GWEN_LOGDOMAIN, and NULL.

Referenced by GWEN_SimplePtrList_new().

Here is the caller graph for this function:

◆ _reallocPtrList()

INTERNAL_PTRLIST * _reallocPtrList ( INTERNAL_PTRLIST *  oldEntries,
uint64_t  totalEntries 
)
static

Definition at line 543 of file simpleptrlist.c.

References DBG_ERROR, DBG_INFO, DBG_VERBOUS, GWEN_LOGDOMAIN, and NULL.

Referenced by GWEN_SimplePtrList_AddPtr().

Here is the caller graph for this function:

◆ GWEN_SimplePtrList_AddFlags()

void GWEN_SimplePtrList_AddFlags ( GWEN_SIMPLEPTRLIST pl,
uint32_t  f 
)

Definition at line 384 of file simpleptrlist.c.

Referenced by GWEN_IdList64_newWithSteps().

Here is the caller graph for this function:

◆ GWEN_SimplePtrList_AddPtr()

int64_t GWEN_SimplePtrList_AddPtr ( GWEN_SIMPLEPTRLIST pl,
void *  p 
)

Definition at line 276 of file simpleptrlist.c.

References _attachToObject(), _reallocPtrList(), DBG_ERROR, DBG_INFO, GWEN_ERROR_MEMORY_FULL, GWEN_LOGDOMAIN, GWEN_SimplePtrList_EnsureWritability(), GWEN_SIMPLEPTRLIST_FLAGS_ATTACHTOOBJECTS, and NULL.

Referenced by GWEN_IdList64_AddTable().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_SimplePtrList_Attach()

void GWEN_SimplePtrList_Attach ( GWEN_SIMPLEPTRLIST pl)

Definition at line 113 of file simpleptrlist.c.

Referenced by GWEN_IdList64_Attach().

Here is the caller graph for this function:

◆ GWEN_SimplePtrList_Clear()

void GWEN_SimplePtrList_Clear ( GWEN_SIMPLEPTRLIST pl)

Definition at line 145 of file simpleptrlist.c.

References _detachFromAllObjects(), GWEN_SIMPLEPTRLIST_FLAGS_DETACHFROMOBJECTS, and NULL.

Referenced by GWEN_IdList64_Clear().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_SimplePtrList_DecUserCounter()

int GWEN_SimplePtrList_DecUserCounter ( GWEN_SIMPLEPTRLIST pl)

Definition at line 208 of file simpleptrlist.c.

References GWEN_ERROR_INVALID.

Referenced by GWEN_IdList64_DecIdCounter().

Here is the caller graph for this function:

◆ GWEN_SimplePtrList_EnsureWritability()

int GWEN_SimplePtrList_EnsureWritability ( GWEN_SIMPLEPTRLIST pl)

Definition at line 622 of file simpleptrlist.c.

References _attachToAllObjects(), _copyPtrList(), _freePtrList(), DBG_ERROR, DBG_VERBOUS, GWEN_ERROR_MEMORY_FULL, GWEN_LOGDOMAIN, GWEN_SIMPLEPTRLIST_FLAGS_ATTACHTOOBJECTS, and NULL.

Referenced by GWEN_IdList64_AddId(), GWEN_SimplePtrList_AddPtr(), and GWEN_SimplePtrList_SetPtrAt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_SimplePtrList_free()

void GWEN_SimplePtrList_free ( GWEN_SIMPLEPTRLIST pl)

Definition at line 122 of file simpleptrlist.c.

References _detachFromAllObjects(), _freePtrList(), DBG_VERBOUS, GWEN_FREE_OBJECT, GWEN_INHERIT_FINI, GWEN_LOGDOMAIN, GWEN_SIMPLEPTRLIST_FLAGS_DETACHFROMOBJECTS, and NULL.

Referenced by GWEN_IdList64_free().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_SimplePtrList_GetEntries()

void * GWEN_SimplePtrList_GetEntries ( const GWEN_SIMPLEPTRLIST pl)

Definition at line 357 of file simpleptrlist.c.

◆ GWEN_SimplePtrList_GetFlags()

uint32_t GWEN_SimplePtrList_GetFlags ( const GWEN_SIMPLEPTRLIST pl)

Definition at line 366 of file simpleptrlist.c.

◆ GWEN_SimplePtrList_GetMaxEntries()

uint64_t GWEN_SimplePtrList_GetMaxEntries ( const GWEN_SIMPLEPTRLIST pl)

Definition at line 339 of file simpleptrlist.c.

◆ GWEN_SimplePtrList_GetPtrAt()

void * GWEN_SimplePtrList_GetPtrAt ( const GWEN_SIMPLEPTRLIST pl,
uint64_t  idx 
)

Definition at line 225 of file simpleptrlist.c.

References DBG_ERROR, GWEN_LOGDOMAIN, and NULL.

Referenced by GWEN_IdList64_GetTableAt().

Here is the caller graph for this function:

◆ GWEN_SimplePtrList_GetSteps()

uint64_t GWEN_SimplePtrList_GetSteps ( const GWEN_SIMPLEPTRLIST pl)

Definition at line 321 of file simpleptrlist.c.

◆ GWEN_SimplePtrList_GetUsedEntries()

uint64_t GWEN_SimplePtrList_GetUsedEntries ( const GWEN_SIMPLEPTRLIST pl)

Definition at line 348 of file simpleptrlist.c.

Referenced by GWEN_IdList64_dup(), GWEN_IdList64_GetLastTablePos(), and GWEN_IdList64_GetUsedTables().

Here is the caller graph for this function:

◆ GWEN_SimplePtrList_GetUserCounter()

uint64_t GWEN_SimplePtrList_GetUserCounter ( const GWEN_SIMPLEPTRLIST pl)

Definition at line 190 of file simpleptrlist.c.

Referenced by GWEN_IdList64_dup(), and GWEN_IdList64_GetEntryCount().

Here is the caller graph for this function:

◆ GWEN_SimplePtrList_GetUserIntData()

int GWEN_SimplePtrList_GetUserIntData ( const GWEN_SIMPLEPTRLIST pl)

Definition at line 163 of file simpleptrlist.c.

Referenced by GWEN_IdList64_dup(), GWEN_IdList64_GetIdAt(), and GWEN_IdList64_GetTableMaxEntries().

Here is the caller graph for this function:

◆ GWEN_SimplePtrList_IncUserCounter()

void GWEN_SimplePtrList_IncUserCounter ( GWEN_SIMPLEPTRLIST pl)

Definition at line 199 of file simpleptrlist.c.

Referenced by GWEN_IdList64_IncIdCounter().

Here is the caller graph for this function:

◆ GWEN_SimplePtrList_LazyCopy()

GWEN_SIMPLEPTRLIST * GWEN_SimplePtrList_LazyCopy ( GWEN_SIMPLEPTRLIST oldList)

Definition at line 88 of file simpleptrlist.c.

References _attachToPtrList(), GWEN_INHERIT_INIT, and GWEN_NEW_OBJECT.

Referenced by GWEN_IdList64_LazyCopy().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_SimplePtrList_new()

GWEN_SIMPLEPTRLIST * GWEN_SimplePtrList_new ( uint64_t  startEntries,
uint64_t  steps 
)

Definition at line 71 of file simpleptrlist.c.

References _mallocPtrList(), GWEN_INHERIT_INIT, and GWEN_NEW_OBJECT.

Referenced by GWEN_IdList64_newWithSteps().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_SimplePtrList_SetAttachObjectFn()

GWEN_SIMPLEPTRLIST_ATTACHOBJECT_FN GWEN_SimplePtrList_SetAttachObjectFn ( GWEN_SIMPLEPTRLIST pl,
GWEN_SIMPLEPTRLIST_ATTACHOBJECT_FN  fn 
)

Definition at line 402 of file simpleptrlist.c.

Referenced by GWEN_IdList64_newWithSteps().

Here is the caller graph for this function:

◆ GWEN_SimplePtrList_SetFlags()

void GWEN_SimplePtrList_SetFlags ( GWEN_SIMPLEPTRLIST pl,
uint32_t  f 
)

Definition at line 375 of file simpleptrlist.c.

◆ GWEN_SimplePtrList_SetFreeObjectFn()

GWEN_SIMPLEPTRLIST_FREEOBJECT_FN GWEN_SimplePtrList_SetFreeObjectFn ( GWEN_SIMPLEPTRLIST pl,
GWEN_SIMPLEPTRLIST_FREEOBJECT_FN  fn 
)

Definition at line 417 of file simpleptrlist.c.

Referenced by GWEN_IdList64_newWithSteps().

Here is the caller graph for this function:

◆ GWEN_SimplePtrList_SetPtrAt()

int GWEN_SimplePtrList_SetPtrAt ( GWEN_SIMPLEPTRLIST pl,
uint64_t  idx,
void *  p 
)

◆ GWEN_SimplePtrList_SetSteps()

void GWEN_SimplePtrList_SetSteps ( GWEN_SIMPLEPTRLIST pl,
uint64_t  steps 
)

Definition at line 330 of file simpleptrlist.c.

◆ GWEN_SimplePtrList_SetUserCounter()

void GWEN_SimplePtrList_SetUserCounter ( GWEN_SIMPLEPTRLIST pl,
uint64_t  i 
)

Definition at line 181 of file simpleptrlist.c.

Referenced by GWEN_IdList64_Clear(), and GWEN_IdList64_dup().

Here is the caller graph for this function:

◆ GWEN_SimplePtrList_SetUserIntData()

void GWEN_SimplePtrList_SetUserIntData ( GWEN_SIMPLEPTRLIST pl,
int  i 
)

Definition at line 172 of file simpleptrlist.c.

Referenced by GWEN_IdList64_newWithSteps().

Here is the caller graph for this function:

◆ GWEN_SimplePtrList_SubFlags()

void GWEN_SimplePtrList_SubFlags ( GWEN_SIMPLEPTRLIST pl,
uint32_t  f 
)

Definition at line 393 of file simpleptrlist.c.