MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / ktxMemStream_getdata

Function ktxMemStream_getdata

lib/memstream.c:414–423  ·  view source on GitHub ↗

* @~English * @brief Get a pointer to a ktxMemStream's data. * * Gets a pointer to data that has been written to the stream. Returned * pointer will be 0 if stream is read-only. * * @param [in] str pointer to the ktxStream whose data pointer is to * be queried. * @param [in,out] ppBytes pointer to a variable in which the data pointer * wi

Source from the content-addressed store, hash-verified

412 * @exception KTX_INVALID_VALUE @p str or @p ppBytes is @c NULL.
413 */
414KTX_error_code ktxMemStream_getdata(ktxStream* str, ktx_uint8_t** ppBytes)
415{
416 if (!str || !ppBytes)
417 return KTX_INVALID_VALUE;
418
419 assert(str->type == eStreamTypeMemory);
420
421 *ppBytes = str->data.mem->bytes;
422 return KTX_SUCCESS;
423}
424
425/**
426 * @~English

Callers 4

TESTFunction · 0.85

Calls 1

assertFunction · 0.85

Tested by 1

TESTFunction · 0.68