blob: ccbac89516be9150f21a6a8be08ae0f43b9c8d8a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/* EINA - EFL data type library
* Copyright (C) 2008 Cedric Bail
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library;
* if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef EINA_INLINE_TRASH_X__
#define EINA_INLINE_TRASH_X__
static inline void
eina_trash_init(Eina_Trash **trash)
{
*trash = NULL;
}
static inline void
eina_trash_push(Eina_Trash **trash, void *data)
{
Eina_Trash *tmp;
tmp = (Eina_Trash *)data;
tmp->next = *trash;
*trash = tmp;
}
static inline void*
eina_trash_pop(Eina_Trash **trash)
{
void *tmp;
tmp = *trash;
if (*trash)
*trash = (*trash)->next;
return tmp;
}
#endif
|