/ Allocators for field handles and standalone fields */ /
| 168 | /* Allocators for field handles and standalone fields */ |
| 169 | /******************************************************/ |
| 170 | static MIMEFieldSDKHandle * |
| 171 | sdk_alloc_field_handle(TSMBuffer /* bufp ATS_UNUSED */, MIMEHdrImpl *mh) |
| 172 | { |
| 173 | MIMEFieldSDKHandle *handle = THREAD_ALLOC(mHandleAllocator, this_thread()); |
| 174 | |
| 175 | // TODO: Should remove this when memory allocation can't fail. |
| 176 | sdk_assert(sdk_sanity_check_null_ptr((void *)handle) == TS_SUCCESS); |
| 177 | |
| 178 | obj_init_header(handle, HDR_HEAP_OBJ_FIELD_SDK_HANDLE, sizeof(MIMEFieldSDKHandle), 0); |
| 179 | handle->mh = mh; |
| 180 | |
| 181 | return handle; |
| 182 | } |
| 183 | |
| 184 | static void |
| 185 | sdk_free_field_handle(TSMBuffer bufp, MIMEFieldSDKHandle *field_handle) |
no test coverage detected