Codebase list miniasm / d38ca527-c12d-48f0-bbb8-d16271661f32/upstream sdict.h
d38ca527-c12d-48f0-bbb8-d16271661f32/upstream

Tree @d38ca527-c12d-48f0-bbb8-d16271661f32/upstream (Download .tar.gz)

sdict.h @d38ca527-c12d-48f0-bbb8-d16271661f32/upstreamraw · history · blame

#ifndef SDICT_H
#define SDICT_H

#include <stdint.h>

typedef struct {
	char *name;
	uint32_t len, aux:31, del:1;
} sd_seq_t;

typedef struct {
	uint32_t n_seq, m_seq;
	sd_seq_t *seq;
	void *h;
} sdict_t;

#ifdef __cplusplus
extern "C" {
#endif

sdict_t *sd_init(void);
void sd_destroy(sdict_t *d);
int32_t sd_put(sdict_t *d, const char *name, uint32_t len);
int32_t sd_get(const sdict_t *d, const char *name);
int32_t *sd_squeeze(sdict_t *d);

#ifdef __cplusplus
}
#endif

#endif