summaryrefslogtreecommitdiff
path: root/legacy/eina
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2010-05-28 19:03:26 +0000
committerVincent Torri <vincent.torri@gmail.com>2010-05-28 19:03:26 +0000
commit247674b26c73ebda732514109f6d85b5bad2f775 (patch)
tree434a55a443b62f28c5f0c675196034ee94a3836d /legacy/eina
parentf446a5b9f95a13e4cd667412f4e31602f04e5269 (diff)
do not declare inlined functions in the source file,
fix a bit the doc of inlined functions SVN revision: 49253
Diffstat (limited to 'legacy/eina')
-rw-r--r--legacy/eina/src/include/eina_inline_list.x66
-rw-r--r--legacy/eina/src/lib/eina_list.c65
2 files changed, 66 insertions, 65 deletions
diff --git a/legacy/eina/src/include/eina_inline_list.x b/legacy/eina/src/include/eina_inline_list.x
index 43b3869fdf..5c77d9642a 100644
--- a/legacy/eina/src/include/eina_inline_list.x
+++ b/legacy/eina/src/include/eina_inline_list.x
@@ -27,6 +27,18 @@
27 * @{ 27 * @{
28 */ 28 */
29 29
30/**
31 * @brief Get the last list node in the list.
32 *
33 * @param list The list to get the last list node from.
34 * @return The last list node in the list.
35 *
36 * This function returns the last list node in the list @p list. If
37 * @p list is @c NULL or empty, @c NULL is returned.
38 *
39 * This is a order-1 operation (it takes the same short time
40 * regardless of the length of the list).
41 */
30static inline Eina_List * 42static inline Eina_List *
31eina_list_last(const Eina_List *list) 43eina_list_last(const Eina_List *list)
32{ 44{
@@ -34,6 +46,16 @@ eina_list_last(const Eina_List *list)
34 return list->accounting->last; 46 return list->accounting->last;
35} 47}
36 48
49/**
50 * @brief Get the next list node after the specified list node.
51 *
52 * @param list The list node to get the next list node from
53 * @return The next list node on success, @c NULL otherwise.
54 *
55 * This function returns the next list node after the current one in
56 * @p list. It is equivalent to list->next. If @p list is @c NULL or
57 * if no next list node exists, it returns @c NULL.
58 */
37static inline Eina_List * 59static inline Eina_List *
38eina_list_next(const Eina_List *list) 60eina_list_next(const Eina_List *list)
39{ 61{
@@ -41,6 +63,17 @@ eina_list_next(const Eina_List *list)
41 return list->next; 63 return list->next;
42} 64}
43 65
66/**
67 * @brief Get the previous list node before the specified list node.
68 *
69 * @param list The list node to get the previous list node from.
70 * @return The previous list node o success, @c NULL otherwise.
71 * if no previous list node exists
72 *
73 * This function returns the previous list node before the current one
74 * in @p list. It is equivalent to list->prev. If @p list is @c NULL or
75 * if no previous list node exists, it returns @c NULL.
76 */
44static inline Eina_List * 77static inline Eina_List *
45eina_list_prev(const Eina_List *list) 78eina_list_prev(const Eina_List *list)
46{ 79{
@@ -48,6 +81,16 @@ eina_list_prev(const Eina_List *list)
48 return list->prev; 81 return list->prev;
49} 82}
50 83
84/**
85 * @brief Get the list node data member.
86 *
87 * @param list The list node to get the data member of.
88 * @return The data member from the list node.
89 *
90 * This function returns the data member of the specified list node @p
91 * list. It is equivalent to list->data. If @p list is @c NULL, this
92 * function returns @c NULL.
93 */
51static inline void * 94static inline void *
52eina_list_data_get(const Eina_List *list) 95eina_list_data_get(const Eina_List *list)
53{ 96{
@@ -55,6 +98,17 @@ eina_list_data_get(const Eina_List *list)
55 return list->data; 98 return list->data;
56} 99}
57 100
101/**
102 * @brief Set the list node data member.
103 *
104 * @param list The list node to get the data member of.
105 * @param data The data member to the list node.
106 * @return The previous data value.
107 *
108 * This function set the data member @p data of the specified list node
109 * @p list. It returns the previous data of the node. If @p list is
110 * @c NULL, this function returns @c NULL.
111 */
58static inline void * 112static inline void *
59eina_list_data_set(Eina_List *list, const void *data) 113eina_list_data_set(Eina_List *list, const void *data)
60{ 114{
@@ -65,6 +119,18 @@ eina_list_data_set(Eina_List *list, const void *data)
65 return tmp; 119 return tmp;
66} 120}
67 121
122/**
123 * @brief Get the count of the number of items in a list.
124 *
125 * @param list The list whose count to return.
126 * @return The number of members in the list.
127 *
128 * This function returns how many members @p list contains. If the
129 * list is @c NULL, 0 is returned.
130 *
131 * NB: This is an order-1 operation and takes the same tiem regardless
132 * of the length of the list.
133 */
68static inline unsigned int 134static inline unsigned int
69eina_list_count(const Eina_List *list) 135eina_list_count(const Eina_List *list)
70{ 136{
diff --git a/legacy/eina/src/lib/eina_list.c b/legacy/eina/src/lib/eina_list.c
index 1c276dca4c..3d5d0473ac 100644
--- a/legacy/eina/src/lib/eina_list.c
+++ b/legacy/eina/src/lib/eina_list.c
@@ -1241,71 +1241,6 @@ eina_list_nth_list(const Eina_List *list, unsigned int n)
1241} 1241}
1242 1242
1243/** 1243/**
1244 * @brief Get the last list node in the list.
1245 *
1246 * @param list The list to get the last list node from.
1247 * @return The last list node in the list.
1248 *
1249 * This function returns the last list node in the list. If @p list is
1250 * @c NULL or empty, @c NULL is returned.
1251 *
1252 * This is a order-1 operation (it takes the same short time
1253 * regardless of the length of the list).
1254 */
1255static inline Eina_List *eina_list_last(const Eina_List *list);
1256
1257/**
1258 * @brief Get the next list node after the specified list node.
1259 *
1260 * @param list The list node to get the next list node from
1261 * @return The next list node on success, @c NULL otherwise.
1262 *
1263 * This function returns the next list node after the current one in
1264 * @p list. It is equivalent to list->next. If @p list is @c NULL or
1265 * if no next list node exists, it returns @c NULL.
1266 */
1267static inline Eina_List *eina_list_next(const Eina_List *list);
1268
1269/**
1270 * @brief Get the previous list node before the specified list node.
1271 *
1272 * @param list The list node to get the previous list node from.
1273 * @return The previous list node o success, @c NULL otherwise.
1274 * if no previous list node exists
1275 *
1276 * This function returns the previous list node before the current one
1277 * in @p list. It is equivalent to list->prev. If @p list is @c NULL or
1278 * if no previous list node exists, it returns @c NULL.
1279 */
1280static inline Eina_List *eina_list_prev(const Eina_List *list);
1281
1282/**
1283 * @brief Get the list node data member.
1284 *
1285 * @param list The list node to get the data member of.
1286 * @return The data member from the list node.
1287 *
1288 * This function returns the data member of the specified list node @p
1289 * list. It is equivalent to list->data. If @p list is @c NULL, this
1290 * function returns @c NULL.
1291 */
1292static inline void *eina_list_data_get(const Eina_List *list);
1293
1294/**
1295 * @brief Get the count of the number of items in a list.
1296 *
1297 * @param list The list whose count to return.
1298 * @return The number of members in the list.
1299 *
1300 * This function returns how many members @p list contains. If the
1301 * list is @c NULL, 0 is returned.
1302 *
1303 * NB: This is an order-1 operation and takes the same tiem regardless
1304 * of the length of the list.
1305 */
1306static inline unsigned int eina_list_count(const Eina_List *list);
1307
1308/**
1309 * @brief Reverse all the elements in the list. 1244 * @brief Reverse all the elements in the list.
1310 * 1245 *
1311 * @param list The list to reverse. 1246 * @param list The list to reverse.