refactor(lsm): allow modules to import other internal header files
This commit is contained in:
parent
c327be80e9
commit
0548efda97
9 changed files with 54 additions and 4 deletions
14
lsm/src/_include/lsm/trie_internal.h
Normal file
14
lsm/src/_include/lsm/trie_internal.h
Normal 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
|
||||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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
1
lsm/src/trie/lsm_trie.c
Normal file
|
|
@ -0,0 +1 @@
|
|||
#include "lsm/trie_internal.h"
|
||||
Loading…
Add table
Add a link
Reference in a new issue