VecCopyInit
Description
Deep-copy init callback wired into the vector, or NULL if the vector was initialised without deep-copy semantics.
Parameters
| Name | Direction | Description |
|---|---|---|
v |
in | Vector to query. |
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Insert.h:530:
*(vd) = (TYPE_OF(*(vd))) {.length = 0, \
.capacity = 0, \
.copy_init = VecCopyInit(vs), \
.copy_deinit = VecCopyDeinit(vs), \
.data = NULL, \
- In
Complex.c:188:
bool result =
(VecLen(&vec) == 0 && VecCapacity(&vec) == 0 && VecBegin(&vec) == NULL &&
VecCopyInit(&vec) == (GenericCopyInit)ComplexItemCopyInit &&
VecCopyDeinit(&vec) == (GenericCopyDeinit)ComplexItemDeinit);- In
Init.c:66:
bool result =
(VecLen(&vec) == 0 && VecCapacity(&vec) == 0 && VecBegin(&vec) == NULL && VecAllocator(&vec)->alignment == 1 &&
VecCopyInit(&vec) == NULL && VecCopyDeinit(&vec) == NULL);
// Clean up
- In
Init.c:77:
// Check initial state
result = result && (VecLen(&test_vec) == 0 && VecCapacity(&test_vec) == 0 && VecBegin(&test_vec) == NULL &&
VecAllocator(&test_vec)->alignment == 1 && VecCopyInit(&test_vec) == NULL &&
VecCopyDeinit(&test_vec) == NULL);- In
Init.c:100:
bool result =
(VecLen(&vec) == 0 && VecCapacity(&vec) == 0 && VecBegin(&vec) == NULL && VecAllocator(&vec)->alignment == 4 &&
VecCopyInit(&vec) == NULL && VecCopyDeinit(&vec) == NULL);
// Clean up
- In
Init.c:111:
// Check initial state
result = result && (VecLen(&test_vec) == 0 && VecCapacity(&test_vec) == 0 && VecBegin(&test_vec) == NULL &&
VecAllocator(&test_vec)->alignment == 16 && VecCopyInit(&test_vec) == NULL &&
VecCopyDeinit(&test_vec) == NULL);- In
Init.c:133:
bool result =
(VecLen(&vec) == 0 && VecCapacity(&vec) == 0 && VecBegin(&vec) == NULL && VecAllocator(&vec)->alignment == 1 &&
VecCopyInit(&vec) == (GenericCopyInit)TestItemCopyInit &&
VecCopyDeinit(&vec) == (GenericCopyDeinit)TestItemDeinit);- In
Init.c:155:
bool result =
(VecLen(&vec) == 0 && VecCapacity(&vec) == 0 && VecBegin(&vec) == NULL && VecAllocator(&vec)->alignment == 8 &&
VecCopyInit(&vec) == (GenericCopyInit)TestItemCopyInit &&
VecCopyDeinit(&vec) == (GenericCopyDeinit)TestItemDeinit);- In
Init.c:201:
result = result && (VecAllocator(&vec_e)->alignment == 8) && (VecAllocator(&vec_f)->alignment == 16);
result = result && (VecAllocator(&vec_g)->alignment == 32) && (VecAllocator(&vec_h)->alignment == 64);
result = result && (VecCopyInit(&vec_c) == (GenericCopyInit)TestItemCopyInit);
result = result && (VecCopyDeinit(&vec_d) == (GenericCopyDeinit)TestItemDeinit);- In
Insert.c:396:
bool allocator_matches = VecAllocator(&dst) == VecAllocator(&src);
bool result = cloned && VecCopyInit(&dst) == VecCopyInit(&src) && VecCopyDeinit(&dst) == VecCopyDeinit(&src) &&
VecAllocator(&dst)->effort == ALLOCATOR_EFFORT_RETRY_FALLBACK &&
VecAllocator(&dst)->retry_limit == 11 && allocator_matches && VecLen(&src) == 3 &&- In
Type.c:32:
bool result =
(VecLen(&vec) == 0 && VecCapacity(&vec) == 0 && VecBegin(&vec) == NULL && VecAllocator(&vec)->alignment == 1 &&
VecCopyInit(&vec) == NULL && VecCopyDeinit(&vec) == NULL);
// Clean up
- In
Type.c:43:
// Check initial state
result = result && (VecLen(&test_vec) == 0 && VecCapacity(&test_vec) == 0 && VecBegin(&test_vec) == NULL &&
VecAllocator(&test_vec)->alignment == 1 && VecCopyInit(&test_vec) == NULL &&
VecCopyDeinit(&test_vec) == NULL);
Last updated on