InnoDB Plugin
1.0
|
Macros | |
#define | DYN_BLOCK_MAGIC_N 375767 |
#define | DYN_BLOCK_FULL_FLAG 0x1000000UL |
Functions | |
UNIV_INTERN dyn_block_t * | dyn_array_add_block (dyn_array_t *arr)) |
UNIV_INLINE ulint | dyn_block_get_used (const dyn_block_t *block) |
UNIV_INLINE byte * | dyn_block_get_data (const dyn_block_t *block) |
UNIV_INLINE dyn_array_t * | dyn_array_create (dyn_array_t *arr) |
UNIV_INLINE void | dyn_array_free (dyn_array_t *arr) |
UNIV_INLINE void * | dyn_array_push (dyn_array_t *arr, ulint size) |
UNIV_INLINE byte * | dyn_array_open (dyn_array_t *arr, ulint size) |
UNIV_INLINE void | dyn_array_close (dyn_array_t *arr, const byte *ptr) |
UNIV_INLINE void * | dyn_array_get_element (const dyn_array_t *arr, ulint pos) |
UNIV_INLINE ulint | dyn_array_get_data_size (const dyn_array_t *arr) |
UNIV_INLINE void | dyn_push_string (dyn_array_t *arr, const byte *str, ulint len) |
The dynamically allocated array
Created 2/5/1996 Heikki Tuuri
#define DYN_BLOCK_FULL_FLAG 0x1000000UL |
Flag for dyn_block_t::used that indicates a full block
#define DYN_BLOCK_MAGIC_N 375767 |
Value of dyn_block_t::magic_n
UNIV_INTERN dyn_block_t* dyn_array_add_block | ( | dyn_array_t * | arr | ) |
Adds a new block to a dyn array.
arr | in/out: dyn array |
UNIV_INLINE void dyn_array_close | ( | dyn_array_t * | arr, |
const byte * | ptr | ||
) |
Closes the buffer returned by dyn_array_open.
arr | in/out: dynamic array |
ptr | in: end of used space |
UNIV_INLINE dyn_array_t* dyn_array_create | ( | dyn_array_t * | arr | ) |
Initializes a dynamic array.
arr | in/out: memory buffer of size sizeof(dyn_array_t) |
UNIV_INLINE void dyn_array_free | ( | dyn_array_t * | arr | ) |
Frees a dynamic array.
arr | in: dyn array |
UNIV_INLINE ulint dyn_array_get_data_size | ( | const dyn_array_t * | arr | ) |
Returns the size of stored data in a dyn array.
arr | in: dyn array |
UNIV_INLINE void* dyn_array_get_element | ( | const dyn_array_t * | arr, |
ulint | pos | ||
) |
Returns pointer to an element in dyn array.
arr | in: dyn array |
pos | in: position of element in bytes from array start |
UNIV_INLINE byte* dyn_array_open | ( | dyn_array_t * | arr, |
ulint | size | ||
) |
Makes room on top of a dyn array and returns a pointer to a buffer in it. After copying the elements, the caller must close the buffer using dyn_array_close.
arr | in: dynamic array |
size | in: size in bytes of the buffer; MUST be smaller than DYN_ARRAY_DATA_SIZE! |
UNIV_INLINE void* dyn_array_push | ( | dyn_array_t * | arr, |
ulint | size | ||
) |
Makes room on top of a dyn array and returns a pointer to the added element. The caller must copy the element to the pointer returned.
arr | in/out: dynamic array |
size | in: size in bytes of the element |
UNIV_INLINE byte* dyn_block_get_data | ( | const dyn_block_t * | block | ) |
Gets pointer to the start of data in a dyn array block.
block | in: dyn array block |
UNIV_INLINE ulint dyn_block_get_used | ( | const dyn_block_t * | block | ) |
Gets the number of used bytes in a dyn array block.
block | in: dyn array block |
UNIV_INLINE void dyn_push_string | ( | dyn_array_t * | arr, |
const byte * | str, | ||
ulint | len | ||
) |
Pushes n bytes to a dyn array.
arr | in/out: dyn array |
str | in: string to write |
len | in: string length |