29 lines · 621 B · C
RawDownload
#pragma once typedef struct sl_htable sl_htable; enum {	HT_N_INLINE = 32,	HT_N_INLINE_PAIRS = HT_N_INLINE/2,}; struct sl_htable {	void **table;	usize size;	usize num;	usize live;	// FIXME(sigrid): to skip over non-items in for-each	// put it on the stack instead?	usize i;	void *local[HT_N_INLINE];}sl_aligned(8); // define this to be an invalid key/value#define HT_NOTFOUND ((void*)-1) // initialize and freesl_htable *htable_new(sl_htable *h, usize numpairs) sl_nonnull(1);void htable_free(sl_htable *h); // clear and (possibly) change sizevoid htable_reset(sl_htable *h, usize sz) sl_nonnull(1);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t