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

Function ktxHashList_CreateCopy

lib/hashlist.c:148–158  ·  view source on GitHub ↗

* @memberof ktxHashList @public * @~English * @brief Create a copy of a hash list. * * @param [in,out] ppHl address of a variable in which to set a pointer to * the newly created hash list. * @param [in] orig head of the ktxHashList to copy. * * @return KTX_SUCCESS or one of the following error codes. * @exception KTX_OUT_OF_MEMORY if not enough memory. */

Source from the content-addressed store, hash-verified

146 * @exception KTX_OUT_OF_MEMORY if not enough memory.
147 */
148KTX_error_code
149ktxHashList_CreateCopy(ktxHashList** ppHl, ktxHashList orig)
150{
151 ktxHashList* hl = (ktxHashList*)malloc(sizeof (ktxKVListEntry*));
152 if (hl == NULL)
153 return KTX_OUT_OF_MEMORY;
154
155 ktxHashList_ConstructCopy(hl, orig);
156 *ppHl = hl;
157 return KTX_SUCCESS;
158}
159
160
161/**

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected