Skip to content

Commit

Permalink
Move lmdb include to .c + add gcc attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
btrkeks committed May 31, 2024
1 parent f54e5a6 commit 3d79ce4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 1 addition & 4 deletions include/db.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@
#define DP_DB_H

#include <stdbool.h>

#include <lmdb.h>

#include "util.h"

// An opaque struct
typedef struct database_s database_t;

database_t *_nonnull_ db_open(char *dbpath, bool readonly);
__attribute__((returns_nonnull)) database_t *_nonnull_ db_open(char *dbpath, bool readonly);
void _nonnull_ db_close(database_t *db);

void _nonnull_ db_put_dictent(database_t *db, dictentry de);
Expand Down
2 changes: 2 additions & 0 deletions src/db.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#include <string.h>
#include <lmdb.h>


#include "db.h"
#include "messages.h"
Expand Down

0 comments on commit 3d79ce4

Please sign in to comment.