* @memberof ktxHashList @public * @~English * @brief Create an empty hash list for storing key-value pairs. * * @param [in,out] ppHl address of a variable in which to set a pointer to * the newly created hash list. * * @return KTX_SUCCESS or one of the following error codes. * @exception KTX_OUT_OF_MEMORY if not enough memory. */
| 121 | * @exception KTX_OUT_OF_MEMORY if not enough memory. |
| 122 | */ |
| 123 | KTX_error_code |
| 124 | ktxHashList_Create(ktxHashList** ppHl) |
| 125 | { |
| 126 | ktxHashList* hl = (ktxHashList*)malloc(sizeof (ktxKVListEntry*)); |
| 127 | if (hl == NULL) |
| 128 | return KTX_OUT_OF_MEMORY; |
| 129 | |
| 130 | ktxHashList_Construct(hl); |
| 131 | *ppHl = hl; |
| 132 | return KTX_SUCCESS; |
| 133 | } |
| 134 | |
| 135 | |
| 136 | /** |