From: Andre Noll Date: Tue, 21 Jul 2009 23:42:18 +0000 (+0200) Subject: Move blob table macros from afs.h to blob.c. X-Git-Tag: v0.4.0~45 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=0f7851078e5eb89565f9b3194ee100ac20bbb7f1;hp=c36f5e92c572c8eaf77c227bce164b9e98a74a3e Move blob table macros from afs.h to blob.c. They are only used there. --- diff --git a/afs.h b/afs.h index ccfb7b8d..aeaf8fb8 100644 --- a/afs.h +++ b/afs.h @@ -271,21 +271,3 @@ enum blob_table_columns { /** A blob table has that many columns. */ NUM_BLOB_COLUMNS }; - -/** Define an osl table description for a blob table. */ -#define DEFINE_BLOB_TABLE_DESC(table_name) \ - struct osl_table_description table_name ## _table_desc = { \ - .name = #table_name, \ - .num_columns = NUM_BLOB_COLUMNS, \ - .flags = OSL_LARGE_TABLE, \ - .column_descriptions = blob_cols \ - }; - -/** Define a pointer to an osl blob table with a canonical name. */ -#define DEFINE_BLOB_TABLE_PTR(table_name) struct osl_table *table_name ## _table; - -/** Define a blob table. */ -#define INIT_BLOB_TABLE(table_name) \ - DEFINE_BLOB_TABLE_DESC(table_name); \ - DEFINE_BLOB_TABLE_PTR(table_name); - diff --git a/blob.c b/blob.c index 126cab43..f0133c3b 100644 --- a/blob.c +++ b/blob.c @@ -64,6 +64,24 @@ static struct osl_column_description blob_cols[] = { } }; +/** Define an osl table description for a blob table. */ +#define DEFINE_BLOB_TABLE_DESC(table_name) \ + struct osl_table_description table_name ## _table_desc = { \ + .name = #table_name, \ + .num_columns = NUM_BLOB_COLUMNS, \ + .flags = OSL_LARGE_TABLE, \ + .column_descriptions = blob_cols \ + }; + +/** Define a pointer to an osl blob table with a canonical name. */ +#define DEFINE_BLOB_TABLE_PTR(table_name) struct osl_table *table_name ## _table; + + +/** Define a blob table. */ +#define INIT_BLOB_TABLE(table_name) \ + DEFINE_BLOB_TABLE_DESC(table_name); \ + DEFINE_BLOB_TABLE_PTR(table_name); + /** \cond doxygen isn't smart enough to recognize these */ INIT_BLOB_TABLE(lyrics); INIT_BLOB_TABLE(images);