| 606 | /// tell this extendible where it's memory offset start is. Added to support inheriting from extendible classes |
| 607 | template <class Derived_t> |
| 608 | uintptr_t |
| 609 | Extendible<Derived_t>::initFields(uintptr_t start_ptr) |
| 610 | { |
| 611 | ink_assert(ext_loc == 0); |
| 612 | start_ptr = ROUNDUP(start_ptr, schema.alloc_align); // pad the previous struct, so that our fields are memaligned correctly |
| 613 | ink_assert(start_ptr - uintptr_t(this) < UINT16_MAX); |
| 614 | ext_loc = static_cast<uint16_t>(start_ptr - uintptr_t(this)); // store the offset to be used by ext::get and ext::set |
| 615 | ink_assert(ext_loc > 0); |
| 616 | schema.callConstructor(start_ptr); // construct all fields |
| 617 | return start_ptr + schema.alloc_size; // return the end of the extendible data |
| 618 | } |
| 619 | |
| 620 | namespace details |
| 621 | { |
nothing calls this directly
no test coverage detected