Menu

Macros

GreenApple

Macros

Main macros

_STRINGLIB_H_

Library inclusion macro.

string

Used instead of _string type.
Only defined if not already existing.

string_new

Not necessary, but recommended.
Assigned to a newly declared string to prevent any sligh chance of error when checking for allocation.
WARNING: never assign to string_new after editing the string, allocated memory won't be freed.

Option macros

_STRINGLIB_FORCE_DEFINE_

Can be defined before library inclusion.
Will force the definition of 'string' macro.

_STRINGLIB_MAX_ALLOC_FAILS_

Fail count for string allocation, default is 50, but allocation should never fail in normal circumstances.
WARNING: 0 means unlimited tries and is highly unrecommended.

_STRINGLIB_NO_OVERLOADING_

Defined by the library if overloading support (via generic allocation) is not present.
Can be defined by the user before including the library to skip overloading.

Passive macros

_STRINGLIB_OVERLOADING_

Defined when function overloading support (via generic selection) is present.

_STRINGLIB_OVERLOADING_WAIT_

Defined by stringlib.c when including stringlib.h to prevent all definitions and undefined afterwards.
WARNING: must not be defined by the user, it WILL make the functiions work incorrectly.

Overloading macros

Macros with the same name as most library functions.
Divided into generic selection overloading macros (can be disabled) and soft overloading macros (can not be desabled)


Related

Wiki: Functions
Wiki: Home