libacfutils
A general purpose library of utility functions designed to make it easier to develop addons for the X-Plane flight simulator.
Loading...
Searching...
No Matches
Functions | Variables
core.c File Reference
#include <acfutils/core.h>
#include <acfutils/safe_alloc.h>
#include <stdlib.h>
Include dependency graph for core.c:

Go to the source code of this file.

Functions

void * lacf_malloc (size_t n)
 
void lacf_free (void *buf)
 

Variables

const char * libacfutils_version = LIBACFUTILS_VERSION
 

Function Documentation

◆ lacf_free()

void lacf_free ( void *  buf)

Whenever libacfutils returns an allocated object (except for the safe_*alloc functions) that you must free, use lacf_free to do so. Otherwise you risk running into troubles with different allocators being used between compilers (thanks Windows!).

Definition at line 49 of file core.c.

◆ lacf_malloc()

void * lacf_malloc ( size_t  n)

Allocates ‘n’ bytes of memory using libacfutils' allocator. This is mostly to complete the functionality of ‘lacf_free’. In general, you won't ever need to call this function.

Definition at line 37 of file core.c.

Variable Documentation

◆ libacfutils_version

const char* libacfutils_version = LIBACFUTILS_VERSION

A string holding the current build version of libacfutils. It's just a 7-character git revision number.

Definition at line 29 of file core.c.