#include "attributes.h"
#include <stdarg.h>
#include <stdlib.h>
Go to the source code of this file.
|
#define | new(TYPE) |
| Allocates memory for one (1) object of the specified type.
|
#define | free_n(ptr) |
| Frees the pointer and sets ptr to NULL
|
#define | deref_as(type, var) |
| Dereferences a pointer as if it was a pointer to type
|
#define | deref_as_offset(type, var, offset) |
| Dereferences a pointer as if it was a pointer to type with an offset.
|
◆ deref_as
#define deref_as |
( |
| type, |
|
|
| var ) |
Value:
Dereferences a pointer as if it was a pointer to type
◆ deref_as_offset
#define deref_as_offset |
( |
| type, |
|
|
| var, |
|
|
| offset ) |
Value:( *( ( type * ) ( var ) ) + offset )
Dereferences a pointer as if it was a pointer to type with an offset.
◆ free_n
Value:
LibraryDefined void free_and_null(void **n)
Definition pointer_utils.h:45
Frees the pointer and sets ptr to NULL
◆ new
Value:calloc( 1, sizeof( TYPE ) )
Allocates memory for one (1) object of the specified type.
◆ free_all()
Frees n pointers by calling free on each.
- Parameters
-
n | number of pointers |
... | pointers |
◆ free_and_null()
Does free(*n) and sets *n = NULL
- Parameters
-