![]() | ![]() | ![]() | GSK Reference Manual | ![]() |
---|
#define GSK_DECLARE_POOL_ALLOCATORS (Type, type, pool_count) #define GSK_STRUCT_MEMBER_SIZE (type, member) #define GSK_STRUCT_MEMBER_END_OFFSET (struct, member) #define _ (s) #define GSK_SKIP_CHAR_TYPE (ptr, condition) #define GSK_SKIP_WHITESPACE (char_ptr) #define GSK_SKIP_NONWHITESPACE (char_ptr)
#define GSK_DECLARE_POOL_ALLOCATORS(Type, type, pool_count)
Declare static inline functions type_free and type_alloc,
(where type is the second parameter to this macro)
which use GMemChunks to implement fast allocation.
Type
is the name of the name of structure to allocate;
and pool_count
is the number to allocate at once.
Type : | Real type of the things to allocate. |
type : | Lowercased type name, for mangling into the function name. |
pool_count : | Number of things to allocate at once. |
#define GSK_STRUCT_MEMBER_SIZE(type, member) (sizeof(((type *)0)->member))
Find size in bytes of a structure member.
type : | |
member : |
|
#define GSK_STRUCT_MEMBER_END_OFFSET(struct, member)
Find offset of a member's end in bytes.
struct : | |
member : |
|
#define GSK_SKIP_CHAR_TYPE(ptr, condition)
Skip ptr
along until it fails the condition
.
ptr : | pointer to a NUL-terminated string. |
condition : | function predicate to test characters with. |
#define GSK_SKIP_WHITESPACE(char_ptr) GSK_SKIP_CHAR_TYPE(char_ptr, isspace)
Skip char_ptr
along until it gets to a non-whitespace character, or the end of the string.
char_ptr : | the pointer to advance. |
#define GSK_SKIP_NONWHITESPACE(char_ptr) GSK_SKIP_CHAR_TYPE(char_ptr, !isspace)
Skip char_ptr
along until it gets to a whitespace character, or the end of the string.
char_ptr : | the pointer to advance. |
<<< Library Initialization | Base Input/Output Object >>> |