* @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. */
| 146 | * @exception KTX_OUT_OF_MEMORY if not enough memory. |
| 147 | */ |
| 148 | KTX_error_code |
| 149 | ktxHashList_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 | /** |
nothing calls this directly
no test coverage detected