gwion-util
utilities for the Gwion project
Loading...
Searching...
No Matches
Macros | Typedefs
container.h File Reference

macros and meta-header for container types More...

#include "vector.h"
#include "m_vector.h"
#include "map.h"
#include "scope.h"

Go to the source code of this file.

Macros

#define MAP_CAP   8 /*< base container capacity */
 
#define OFFSET   2 /*< size of container offset */
 
#define VLEN(v)   (v)->ptr[0] /*< length */
 
#define VCAP(v)   (v)->ptr[1] /*< capacity */
 
#define VPTR(v, i)   (v)->ptr[OFFSET + (i)] /* pointer to data */
 

Typedefs

typedef uintptr_t vtype
 

Detailed Description

macros and meta-header for container types

Definition in file container.h.

Macro Definition Documentation

◆ MAP_CAP

#define MAP_CAP   8 /*< base container capacity */

Definition at line 8 of file container.h.

◆ OFFSET

#define OFFSET   2 /*< size of container offset */

Definition at line 9 of file container.h.

◆ VCAP

#define VCAP ( v)    (v)->ptr[1] /*< capacity */

Definition at line 11 of file container.h.

◆ VLEN

#define VLEN ( v)    (v)->ptr[0] /*< length */

Definition at line 10 of file container.h.

◆ VPTR

#define VPTR ( v,
i )   (v)->ptr[OFFSET + (i)] /* pointer to data */

Definition at line 12 of file container.h.

Typedef Documentation

◆ vtype

typedef uintptr_t vtype

Definition at line 14 of file container.h.