refactor(lsm): allow modules to import other internal header files

This commit is contained in:
Jef Roosens 2023-10-13 13:07:40 +02:00
parent c327be80e9
commit 0548efda97
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
9 changed files with 54 additions and 4 deletions

View file

@ -0,0 +1,14 @@
#ifndef LSM_TRIE_INTERNAL
#define LSM_TRIE_INTERNAL
#include "lsm/bt_internal.h"
#include "lsm/str_internal.h"
#include "lsm/trie.h"
typedef struct lsm_trie_node {
lsm_bt bt;
lsm_str skip;
char c;
} lsm_trie_node;
#endif

View file

@ -1,6 +1,6 @@
#include <stdlib.h>
#include "lsm_bt_internal.h"
#include "lsm/bt_internal.h"
lsm_error lsm_bt_node_init(lsm_bt_node **ptr, const char key, void *data) {
lsm_bt_node *node = calloc(1, sizeof(lsm_bt_node));

View file

@ -3,7 +3,7 @@
#include <string.h>
#include "lsm.h"
#include "lsm_str_internal.h"
#include "lsm/str_internal.h"
lsm_error lsm_str_init_zero(lsm_str **ptr) {
lsm_str *str = calloc(1, sizeof(lsm_str));

1
lsm/src/trie/lsm_trie.c Normal file
View file

@ -0,0 +1 @@
#include "lsm/trie_internal.h"