浏览代码

srdb1: removed extern inline function prototypes

- the .c files are not linked against modules code, thus inline
  replacing request cannot be resolved by compilers, the strict ones
  (e.g., llvm) throw error
Daniel-Constantin Mierla 11 年之前
父节点
当前提交
5beb495d47
共有 2 个文件被更改,包括 12 次插入12 次删除
  1. 6 6
      lib/srdb1/db_res.c
  2. 6 6
      lib/srdb1/db_res.h

+ 6 - 6
lib/srdb1/db_res.c

@@ -41,7 +41,7 @@
 /*
  * Release memory used by rows
  */
-inline int db_free_rows(db1_res_t* _r)
+int db_free_rows(db1_res_t* _r)
 {
 	int i;
 
@@ -70,7 +70,7 @@ inline int db_free_rows(db1_res_t* _r)
 /*
  * Release memory used by columns
  */
-inline int db_free_columns(db1_res_t* _r)
+int db_free_columns(db1_res_t* _r)
 {
 	int col;
 
@@ -106,7 +106,7 @@ inline int db_free_columns(db1_res_t* _r)
 /*
  * Create a new result structure and initialize it
  */
-inline db1_res_t* db_new_result(void)
+db1_res_t* db_new_result(void)
 {
 	db1_res_t* r = NULL;
 	r = (db1_res_t*)pkg_malloc(sizeof(db1_res_t));
@@ -123,7 +123,7 @@ inline db1_res_t* db_new_result(void)
 /*
  * Release memory used by a result structure
  */
-inline int db_free_result(db1_res_t* _r)
+int db_free_result(db1_res_t* _r)
 {
 	if (!_r)
 	{
@@ -143,7 +143,7 @@ inline int db_free_result(db1_res_t* _r)
  * Allocate storage for column names and type in existing
  * result structure.
  */
-inline int db_allocate_columns(db1_res_t* _r, const unsigned int cols)
+int db_allocate_columns(db1_res_t* _r, const unsigned int cols)
 {
 	RES_NAMES(_r) = (db_key_t*)pkg_malloc(sizeof(db_key_t) * cols);
 	if (!RES_NAMES(_r)) {
@@ -173,7 +173,7 @@ inline int db_allocate_columns(db1_res_t* _r, const unsigned int cols)
  * \param _res result set
  * \return zero on success, negative on errors
  */
-inline int db_allocate_rows(db1_res_t* _res)
+int db_allocate_rows(db1_res_t* _res)
 {
 	int len = sizeof(db_row_t) * RES_ROW_N(_res);
 	RES_ROWS(_res) = (struct db_row*)pkg_malloc(len);

+ 6 - 6
lib/srdb1/db_res.h

@@ -88,7 +88,7 @@ typedef struct db1_res {
  * \param _r the result that should be released
  * \return zero on success, negative on errors
  */
-extern inline int db_free_rows(db1_res_t* _r);
+int db_free_rows(db1_res_t* _r);
 
 
 /**
@@ -98,20 +98,20 @@ extern inline int db_free_rows(db1_res_t* _r);
  * \param _r the result that should be released
  * \return zero on success, negative on errors
  */
-extern inline int db_free_columns(db1_res_t* _r);
+int db_free_columns(db1_res_t* _r);
 
 
 /**
  * Create a new result structure and initialize it.
  * \return a pointer to the new result on success, NULL on errors
  */
-extern inline db1_res_t* db_new_result(void);
+db1_res_t* db_new_result(void);
 
 /**
  * Release memory used by a result structure.
  * \return zero on success, negative on errors
  */
-extern inline int db_free_result(db1_res_t* _r);
+int db_free_result(db1_res_t* _r);
 
 /**
  * Allocate storage for column names and type in existing result structure.
@@ -121,7 +121,7 @@ extern inline int db_free_result(db1_res_t* _r);
  * \param cols number of columns
  * \return zero on success, negative on errors
  */
-extern inline int db_allocate_columns(db1_res_t* _r, const unsigned int cols);
+int db_allocate_columns(db1_res_t* _r, const unsigned int cols);
 
 
 /**
@@ -129,6 +129,6 @@ extern inline int db_allocate_columns(db1_res_t* _r, const unsigned int cols);
  * \param _res result set
  * \return zero on success, negative on errors
  */
-extern inline int db_allocate_rows(db1_res_t* _res);
+int db_allocate_rows(db1_res_t* _res);
 
 #endif /* DB1_RES_H */