]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb2/tdb1_tdb.c
tdb2: remove _PUBLIC_ in tdb1 functions.
[ccan] / ccan / tdb2 / tdb1_tdb.c
index 93d2132f3847f453319054becf32fb4770672619..cc7e580f2c3f1e8fc596da4a53c3039b94ad36de 100644 (file)
 
 #include "tdb1_private.h"
 
 
 #include "tdb1_private.h"
 
-_PUBLIC_ TDB1_DATA tdb1_null;
+TDB1_DATA tdb1_null;
 
 /*
   non-blocking increment of the tdb sequence number if the tdb has been opened using
   the TDB1_SEQNUM flag
 */
 
 /*
   non-blocking increment of the tdb sequence number if the tdb has been opened using
   the TDB1_SEQNUM flag
 */
-_PUBLIC_ void tdb1_increment_seqnum_nonblock(struct tdb1_context *tdb)
+void tdb1_increment_seqnum_nonblock(struct tdb1_context *tdb)
 {
        tdb1_off_t seqnum=0;
 
 {
        tdb1_off_t seqnum=0;
 
@@ -199,7 +199,7 @@ static TDB1_DATA _tdb1_fetch(struct tdb1_context *tdb, TDB1_DATA key)
        return ret;
 }
 
        return ret;
 }
 
-_PUBLIC_ TDB1_DATA tdb1_fetch(struct tdb1_context *tdb, TDB1_DATA key)
+TDB1_DATA tdb1_fetch(struct tdb1_context *tdb, TDB1_DATA key)
 {
        TDB1_DATA ret = _tdb1_fetch(tdb, key);
 
 {
        TDB1_DATA ret = _tdb1_fetch(tdb, key);
 
@@ -224,7 +224,7 @@ _PUBLIC_ TDB1_DATA tdb1_fetch(struct tdb1_context *tdb, TDB1_DATA key)
  * Return -1 if the record was not found.
  */
 
  * Return -1 if the record was not found.
  */
 
-_PUBLIC_ int tdb1_parse_record(struct tdb1_context *tdb, TDB1_DATA key,
+int tdb1_parse_record(struct tdb1_context *tdb, TDB1_DATA key,
                     int (*parser)(TDB1_DATA key, TDB1_DATA data,
                                   void *private_data),
                     void *private_data)
                     int (*parser)(TDB1_DATA key, TDB1_DATA data,
                                   void *private_data),
                     void *private_data)
@@ -267,7 +267,7 @@ static int tdb1_exists_hash(struct tdb1_context *tdb, TDB1_DATA key, uint32_t ha
        return 1;
 }
 
        return 1;
 }
 
-_PUBLIC_ int tdb1_exists(struct tdb1_context *tdb, TDB1_DATA key)
+int tdb1_exists(struct tdb1_context *tdb, TDB1_DATA key)
 {
        uint32_t hash = tdb->hash_fn(&key);
        int ret;
 {
        uint32_t hash = tdb->hash_fn(&key);
        int ret;
@@ -425,7 +425,7 @@ static int tdb1_delete_hash(struct tdb1_context *tdb, TDB1_DATA key, uint32_t ha
        return ret;
 }
 
        return ret;
 }
 
-_PUBLIC_ int tdb1_delete(struct tdb1_context *tdb, TDB1_DATA key)
+int tdb1_delete(struct tdb1_context *tdb, TDB1_DATA key)
 {
        uint32_t hash = tdb->hash_fn(&key);
        int ret;
 {
        uint32_t hash = tdb->hash_fn(&key);
        int ret;
@@ -594,7 +594,7 @@ static int _tdb1_store(struct tdb1_context *tdb, TDB1_DATA key,
 
    return 0 on success, -1 on failure
 */
 
    return 0 on success, -1 on failure
 */
-_PUBLIC_ int tdb1_store(struct tdb1_context *tdb, TDB1_DATA key, TDB1_DATA dbuf, int flag)
+int tdb1_store(struct tdb1_context *tdb, TDB1_DATA key, TDB1_DATA dbuf, int flag)
 {
        uint32_t hash;
        int ret;
 {
        uint32_t hash;
        int ret;
@@ -615,7 +615,7 @@ _PUBLIC_ int tdb1_store(struct tdb1_context *tdb, TDB1_DATA key, TDB1_DATA dbuf,
 }
 
 /* Append to an entry. Create if not exist. */
 }
 
 /* Append to an entry. Create if not exist. */
-_PUBLIC_ int tdb1_append(struct tdb1_context *tdb, TDB1_DATA key, TDB1_DATA new_dbuf)
+int tdb1_append(struct tdb1_context *tdb, TDB1_DATA key, TDB1_DATA new_dbuf)
 {
        uint32_t hash;
        TDB1_DATA dbuf;
 {
        uint32_t hash;
        TDB1_DATA dbuf;
@@ -665,7 +665,7 @@ failed:
   return the current logging function
   useful for external tdb routines that wish to log tdb errors
 */
   return the current logging function
   useful for external tdb routines that wish to log tdb errors
 */
-_PUBLIC_ tdb1_log_func tdb1_log_fn(struct tdb1_context *tdb)
+tdb1_log_func tdb1_log_fn(struct tdb1_context *tdb)
 {
        return tdb->log.log_fn;
 }
 {
        return tdb->log.log_fn;
 }
@@ -681,7 +681,7 @@ _PUBLIC_ tdb1_log_func tdb1_log_fn(struct tdb1_context *tdb)
   The aim of this sequence number is to allow for a very lightweight
   test of a possible tdb change.
 */
   The aim of this sequence number is to allow for a very lightweight
   test of a possible tdb change.
 */
-_PUBLIC_ int tdb1_get_seqnum(struct tdb1_context *tdb)
+int tdb1_get_seqnum(struct tdb1_context *tdb)
 {
        tdb1_off_t seqnum=0;
 
 {
        tdb1_off_t seqnum=0;
 
@@ -689,7 +689,7 @@ _PUBLIC_ int tdb1_get_seqnum(struct tdb1_context *tdb)
        return seqnum;
 }
 
        return seqnum;
 }
 
-_PUBLIC_ int tdb1_hash_size(struct tdb1_context *tdb)
+int tdb1_hash_size(struct tdb1_context *tdb)
 {
        return tdb->header.hash_size;
 }
 {
        return tdb->header.hash_size;
 }
@@ -726,7 +726,7 @@ static int tdb1_free_region(struct tdb1_context *tdb, tdb1_off_t offset, ssize_t
 
   This code carefully steps around the recovery area, leaving it alone
  */
 
   This code carefully steps around the recovery area, leaving it alone
  */
-_PUBLIC_ int tdb1_wipe_all(struct tdb1_context *tdb)
+int tdb1_wipe_all(struct tdb1_context *tdb)
 {
        int i;
        tdb1_off_t offset = 0;
 {
        int i;
        tdb1_off_t offset = 0;
@@ -832,7 +832,7 @@ static int repack_traverse(struct tdb1_context *tdb, TDB1_DATA key, TDB1_DATA da
 /*
   repack a tdb
  */
 /*
   repack a tdb
  */
-_PUBLIC_ int tdb1_repack(struct tdb1_context *tdb)
+int tdb1_repack(struct tdb1_context *tdb)
 {
        struct tdb1_context *tmp_db;
        struct traverse_state state;
 {
        struct tdb1_context *tmp_db;
        struct traverse_state state;