From: Andre Noll Date: Sat, 31 May 2008 15:15:57 +0000 (+0200) Subject: osl.h.in cleanups and improvments. X-Git-Tag: v0.1.0~94 X-Git-Url: http://git.tuebingen.mpg.de/?p=osl.git;a=commitdiff_plain;h=134e8d56c1c8ab60ac40ad6909cef19caf707e32;ds=sidebyside osl.h.in cleanups and improvments. - Add visibility pragmas - More documentation - Kill compare function pointers. --- diff --git a/osl.h.in b/osl.h.in index a586be2..01b69fb 100644 --- a/osl.h.in +++ b/osl.h.in @@ -1,4 +1,3 @@ -#include /* * Copyright (C) 2007-2008 Andre Noll * @@ -7,7 +6,12 @@ /** \file osl.h User interface for the object storage layer. */ -/** describes an object of the object storage layer (osl) */ +#include + +/** Export all declarations in this file. */ +#pragma GCC visibility push(default) + +/** Describes an object of the object storage layer (osl) */ struct osl_object { /** Pointer to the data of the object. */ void *data; @@ -63,7 +67,9 @@ enum osl_storage_flags { OSL_DONT_FREE = 8 }; +/** Opaque osl table structure. */ struct osl_table; +/** Opaque osl row structure. */ struct osl_row; /** @@ -75,15 +81,20 @@ struct osl_row; */ typedef int osl_compare_func(const struct osl_object *obj1, const struct osl_object *obj2); -typedef int osl_rbtree_loop_func(struct osl_row *row, void *data); -osl_compare_func osl_hash_compare, uint32_compare; +/** + * The osl_rbreee_loop functions take a function pointer of this type. For each + * node in the rbtree, the given function is called. + * + * \sa osl_rbtree_loop(), osl_rbtree_loop_reverse(). + */ +typedef int osl_rbtree_loop_func(struct osl_row *row, void *data); /** * Describes one column of a osl table. */ struct osl_column_description { - /** One of zje tree possible types of storage */ + /** One of the tree possible types of storage */ enum osl_storage_type storage_type; /** Specifies further properties of the column */ enum osl_storage_flags storage_flags; @@ -146,8 +157,6 @@ enum osl_close_flags { OSL_FREE_VOLATILE = 2 }; - - int osl_create_table(const struct osl_table_description *desc); int osl_open_table(const struct osl_table_description *desc, struct osl_table **result); @@ -178,4 +187,8 @@ int osl_get_nth_row(const struct osl_table *t, unsigned col_num, unsigned n, struct osl_row **result); int osl_get_rank(const struct osl_table *t, struct osl_row *r, unsigned col_num, unsigned *rank); +int osl_hash_compare(const struct osl_object *obj1, + const struct osl_object *obj2); const char *osl_strerror(int nr); + +#pragma GCC visibility pop