Skip to content

typedefs.h#

Clearer C types and useful platform-agnostic macros.

Authors#

TheSilvered


Macros#

Nst_WIN#

Description:

Defined when compiling on MS Windows.


_Nst_ARCH_x64#

Description:

Defined when compiling on 64-bit architectures.


_Nst_ARCH_x86#

Description:

Defined when compiling on 32-bit architectures.


NstEXP#

Description:

Exports a symbol in a dynamic library.


Nst_NORETURN#

Description:

Marks a function that does not finish.


Nst_WIN_FMT#

Description:

Marks an argument as a printf format string on MSVC.


Nst_GNU_FMT#

Synopsis:

#define Nst_GNU_FMT(m, n)

Description:

Marks an argument as a printf format string on GCC.


Nst_LITTLE_ENDIAN#

Description:

Represents little-endian systems. Always defined.


Nst_BIG_ENDIAN#

Description:

Represents big-endian systems. Always defined.


Nst_ENDIANNESS#

Description:

The endianness of the system, either Nst_LITTLE_ENDIAN or Nst_BIG_ENDIAN.


NstC#

Description:

Marks a function for for the standard C declaration (__cdecl).


Nst_UNUSED#

Synopsis:

#define Nst_UNUSED(v)

Description:

Marks an argument as unused. To be used inside the body of the function.


Nst_TRACK_OBJ_INIT_POS#

Description:

Defined to compile with additional arguments that track the location of the creation of Nest objects.


Type aliases#

i8#

Synopsis:

typedef char i8

Description:

char alias.


i16#

Synopsis:

typedef short i16

Description:

short alias.


i32#

Synopsis:

typedef long i32

Description:

long int alias.


i64#

Synopsis:

typedef long long i64

Description:

long long int alias.


u8#

Synopsis:

typedef unsigned char u8

Description:

unsigned char alias.


u16#

Synopsis:

typedef unsigned short u16

Description:

unsigned short alias.


u32#

Synopsis:

typedef unsigned long u32

Description:

unsigned long alias.


u64#

Synopsis:

typedef unsigned long long u64

Description:

unsigned long long alias.


f32#

Synopsis:

typedef float f32

Description:

float alias.


f64#

Synopsis:

typedef double f64

Description:

double alias.


usize#

Synopsis:

typedef size_t usize

Description:

size_t alias.


isize#

Synopsis:

typedef ptrdiff_t isize

Description:

ptrdiff_t alias.


Nst_NestCallable#

Synopsis:

typedef Nst_Obj *(*Nst_NestCallable)(usize, Nst_Obj **)

Description:

The signature of a C function callable by Nest.