[babl] babl: Don't declare functions with external linkage as inline
- From: Martin Nordholts <martinn src gnome org>
- To: svn-commits-list gnome org
- Subject: [babl] babl: Don't declare functions with external linkage as inline
- Date: Tue, 14 Jul 2009 17:44:45 +0000 (UTC)
commit 8c9bfc3e708799b5e752c7aecf21e12ec51c0fb1
Author: Martin Nordholts <martinn src gnome org>
Date: Tue Jul 14 19:33:56 2009 +0200
babl: Don't declare functions with external linkage as inline
Don't declare functions with external linkage as inline. The way we
did it is forbidden in C99 and causes compilation problems on other
platforms. See bug #572154.
babl/babl-hash-table.c | 6 +++---
babl/babl-hash-table.h | 6 +++---
babl/babl-list.c | 10 +++++-----
babl/babl-list.h | 10 +++++-----
4 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/babl/babl-hash-table.c b/babl/babl-hash-table.c
index a468d4a..a9c5deb 100644
--- a/babl/babl-hash-table.c
+++ b/babl/babl-hash-table.c
@@ -34,7 +34,7 @@ static void
hash_rehash (BablHashTable *htab);
-inline int
+int
babl_hash_by_str (BablHashTable *htab,
const char *str)
{
@@ -53,7 +53,7 @@ babl_hash_by_str (BablHashTable *htab,
return (hash & htab->mask);
}
-inline int
+int
babl_hash_by_int (BablHashTable *htab,
int id)
{
@@ -137,7 +137,7 @@ hash_rehash (BablHashTable *htab)
babl_free (nhtab);
}
-inline int
+int
babl_hash_table_size (BablHashTable *htab)
{
return htab->mask + 1;
diff --git a/babl/babl-hash-table.h b/babl/babl-hash-table.h
index ae296fb..881d1d6 100644
--- a/babl/babl-hash-table.h
+++ b/babl/babl-hash-table.h
@@ -44,15 +44,15 @@ BablHashTable *
babl_hash_table_init (BablHashValFunction hfunc,
BablHashFindFunction ffunc);
-inline int
+int
babl_hash_by_str (BablHashTable *htab,
const char *str);
-inline int
+int
babl_hash_by_int (BablHashTable *htab,
int id);
-inline int
+int
babl_hash_table_size (BablHashTable *htab);
int
diff --git a/babl/babl-list.c b/babl/babl-list.c
index 898e8c5..de254b1 100644
--- a/babl/babl-list.c
+++ b/babl/babl-list.c
@@ -68,7 +68,7 @@ babl_list_size (BablList *list)
return list->count;
}
-inline void
+void
babl_list_insert_last (BablList *list,
Babl *item)
{
@@ -88,7 +88,7 @@ babl_list_insert_last (BablList *list,
list->items[list->count++] = item;
}
-inline void
+void
babl_list_remove_last (BablList *list)
{
babl_assert (list);
@@ -97,7 +97,7 @@ babl_list_remove_last (BablList *list)
list->count--;
}
-inline Babl *
+Babl *
babl_list_get_first (BablList *list)
{
babl_assert (list);
@@ -106,7 +106,7 @@ babl_list_get_first (BablList *list)
return (list->items[0]);
}
-inline Babl *
+Babl *
babl_list_get_last (BablList *list)
{
babl_assert (list);
@@ -115,7 +115,7 @@ babl_list_get_last (BablList *list)
return (list->items[list->count - 1]);
}
-inline void
+void
babl_list_copy (BablList *from,
BablList *to)
{
diff --git a/babl/babl-list.h b/babl/babl-list.h
index d38eb6d..a339b1c 100644
--- a/babl/babl-list.h
+++ b/babl/babl-list.h
@@ -42,20 +42,20 @@ babl_list_destroy (BablList *list);
int
babl_list_size (BablList *list);
-inline void
+void
babl_list_insert_last (BablList *list,
Babl *item);
-inline void
+void
babl_list_remove_last (BablList *list);
-inline Babl *
+Babl *
babl_list_get_first (BablList *list);
-inline Babl *
+Babl *
babl_list_get_last (BablList *list);
-inline void
+void
babl_list_copy (BablList *from,
BablList *to);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]