Objectively
Ultra-lightweight object oriented framework for GNU C.
Loading...
Searching...
No Matches
Null.h File Reference

The Null sentinel. More...

Go to the source code of this file.

Data Structures

struct  Null
 The Null sentinel. More...
 

Functions

OBJECTIVELY_EXPORT Class_Null (void)
 

Detailed Description

The Null sentinel.

Definition in file Null.h.

Function Documentation

◆ _Null()

OBJECTIVELY_EXPORT Class * _Null ( void  )

Definition at line 83 of file Null.c.

83 {
84 static Class *clazz;
85 static Once once;
86
87 do_once(&once, {
88 clazz = _initialize(&(const ClassDef) {
89 .name = "Null",
90 .superclass = _Object(),
91 .instanceSize = sizeof(Null),
92 .interfaceOffset = offsetof(Null, interface),
93 .interfaceSize = sizeof(NullInterface),
96 });
97 });
98
99 return clazz;
100}
Class * _initialize(const ClassDef *def)
Initializes the given Class.
Definition Class.c:86
static void destroy(Class *clazz)
Definition Null.c:64
static void initialize(Class *clazz)
Definition Null.c:72
Class * _Object(void)
Definition Object.c:136
long Once
The Once type.
Definition Once.h:37
#define do_once(once, block)
Executes the given block at most one time.
Definition Once.h:43
ClassDefs are passed to _initialize via an archetype to initialize a Class.
Definition Class.h:41
The runtime representation of a Class.
Definition Class.h:95
The Null sentinel.
Definition Null.h:42