Blender V2.61 - r43446
|
little array macro library. More...
Go to the source code of this file.
Defines | |
#define | V_DECLARE(vec) int _##vec##_count=0; void *_##vec##_tmp |
#define | V_DYNDECLARE(vec) V_DECLARE(vec) |
#define | V_SIZE(vec) ((signed int)((vec)==NULL ? 0 : MEM_allocN_len(vec) / sizeof(*vec))) |
#define | V_COUNT(vec) _##vec##_count |
#define | V_GROW(vec) |
#define | V_FREE(vec) if (vec) MEM_freeN(vec); |
#define | V_RESET(vec) _##vec##_count=0 |
#define | V_SETCOUNT(vec, count) _##vec##_count = (count) |
little array macro library.
Definition in file BKE_array_mallocn.h.
#define V_COUNT | ( | vec | ) | _##vec##_count |
Definition at line 65 of file BKE_array_mallocn.h.
#define V_DECLARE | ( | vec | ) | int _##vec##_count=0; void *_##vec##_tmp |
Definition at line 53 of file BKE_array_mallocn.h.
#define V_DYNDECLARE | ( | vec | ) | V_DECLARE(vec) |
Definition at line 59 of file BKE_array_mallocn.h.
Referenced by edgering_sel().
#define V_FREE | ( | vec | ) | if (vec) MEM_freeN(vec); |
Definition at line 76 of file BKE_array_mallocn.h.
#define V_GROW | ( | vec | ) |
V_SIZE(vec) > _##vec##_count ? _##vec##_count++ : \ ((_##vec##_tmp = MEM_callocN(sizeof(*vec)*(_##vec##_count*2+2), #vec " " __FILE__ " ")),\ (void)(vec && memcpy(_##vec##_tmp, vec, sizeof(*vec) * _##vec##_count)),\ (void)(vec && (MEM_freeN(vec),1)),\ (vec = _##vec##_tmp),\ _##vec##_count++)
Definition at line 68 of file BKE_array_mallocn.h.
Referenced by edgering_sel().
#define V_RESET | ( | vec | ) | _##vec##_count=0 |
Definition at line 80 of file BKE_array_mallocn.h.
#define V_SETCOUNT | ( | vec, | |
count | |||
) | _##vec##_count = (count) |
Definition at line 83 of file BKE_array_mallocn.h.
#define V_SIZE | ( | vec | ) | ((signed int)((vec)==NULL ? 0 : MEM_allocN_len(vec) / sizeof(*vec))) |
Definition at line 62 of file BKE_array_mallocn.h.