Synesis Software

Function Control Flags
[cstring API]


Detailed Description

These flags control the behaviour of the various functions in the library.


Defines

#define CSTRING_F_TYPE_MASK   (0x003f)
#define CSTRING_F_MEMORY_IS_INTERNAL_HEAP   (0x0000)
#define CSTRING_F_MEMORY_IS_BORROWED   (0x0001)
#define CSTRING_F_MEMORY_IS_FIXED   (0x0002)
#define CSTRING_F_MEMORY_IS_READONLY   (0x0004)
#define CSTRING_F_MEMORY_IS_CONST   CSTRING_F_MEMORY_IS_READONLY
#define CSTRING_F_MEMORY_IS_OFFSET   (0x0040)
#define CSTRING_F_ARENA_MASK   (0xff00)
#define CSTRING_F_USE_REALLOC   (0x0000)
#define CSTRING_F_USE_WIN32_GLOBAL_MEMORY   (0x0100)
#define CSTRING_F_USE_WIN32_PROCESSHEAP_MEMORY   (0x0200)
#define CSTRING_F_USE_WIN32_COM_TASK_MEMORY   (0x0400)
#define CSTRING_F_USE_CUSTOMARENAFUNCTIONS   (0x2000)
#define CSTRING_F_CUSTOMARENA_CC_CDECL   (0x0000)
#define CSTRING_F_CUSTOMARENA_CC_STDCALL   (0x0040)


Define Documentation

#define CSTRING_F_ARENA_MASK   (0xff00)
 

#define CSTRING_F_CUSTOMARENA_CC_CDECL   (0x0000)
 

Treats the externally supplied allocator function as having CDecl calling convention (de-)allocation (NOT CURRENTLY SUPPORTED)

#define CSTRING_F_CUSTOMARENA_CC_STDCALL   (0x0040)
 

Treats the externally supplied allocator function as having StdCall calling convention (de-)allocation (NOT CURRENTLY SUPPORTED)

#define CSTRING_F_MEMORY_IS_BORROWED   (0x0001)
 

Memory is supplied external to the API, and may not be deallocated, moved or expanded.

Note:
Implies CSTRING_F_MEMORY_IS_FIXED

#define CSTRING_F_MEMORY_IS_CONST   CSTRING_F_MEMORY_IS_READONLY
 

Equivalent to CSTRING_F_MEMORY_IS_READONLY

Deprecated:

#define CSTRING_F_MEMORY_IS_FIXED   (0x0002)
 

Memory is of fixed size, and any operation that requires expansion will fail

#define CSTRING_F_MEMORY_IS_INTERNAL_HEAP   (0x0000)
 

Memory is allocated by the heap function, and is owned by the cstring instance

#define CSTRING_F_MEMORY_IS_OFFSET   (0x0040)
 

cstring instance may not be modified. This flag cannot be set by client code.

#define CSTRING_F_MEMORY_IS_READONLY   (0x0004)
 

cstring instance may not be modified

#define CSTRING_F_TYPE_MASK   (0x003f)
 

#define CSTRING_F_USE_CUSTOMARENAFUNCTIONS   (0x2000)
 

Uses an externally supplied allocator function for all memory (de-)allocation (NOT CURRENTLY SUPPORTED)

#define CSTRING_F_USE_REALLOC   (0x0000)
 

Uses C standard library function realloc() for all memory (de-)allocation

#define CSTRING_F_USE_WIN32_COM_TASK_MEMORY   (0x0400)
 

Uses COM Task Allocator for all memory (de-)allocation (Windows only)

#define CSTRING_F_USE_WIN32_GLOBAL_MEMORY   (0x0100)
 

Uses Win32 Global Memory API for all memory (de-)allocation (Windows only)

#define CSTRING_F_USE_WIN32_PROCESSHEAP_MEMORY   (0x0200)
 

Uses Win32 Global Process Heap for all memory (de-)allocation (Windows only)


cstring Library documentation © Matthew Wilson and Synesis Software Pty Ltd, 1994-2005