Debian Codegraph @

u8stream/include/u8arena/universal_arena_list_element.inl

raw
1 /* File: universal_arena_list_element.inl; Copyright and License: see below */
2
3 #include <assert.h>
4
5 static inline void universal_arena_list_element_init( universal_arena_list_element_t *this_,
6 void* data,
7 universal_arena_list_element_t* next )
8 {
9 assert( data != NULL );
10 (*this_).data = data;
11 (*this_).next = next;
12 }
13
14 static inline void universal_arena_list_element_destroy( universal_arena_list_element_t *this_ )
15 {
16 assert( (*this_).data != NULL );
17 (*this_).data = NULL;
18 (*this_).next = NULL;
19 }
20
21 static inline void* universal_arena_list_element_get_data( universal_arena_list_element_t *this_ )
22 {
23 assert( (*this_).data != NULL );
24 return (*this_).data;
25 }
26
27 static inline universal_arena_list_element_t* universal_arena_list_element_get_next( universal_arena_list_element_t *this_ )
28 {
29 return (*this_).next;
30 }
31
32 static inline void universal_arena_list_element_set_next( universal_arena_list_element_t *this_,
33 universal_arena_list_element_t *next )
34 {
35 (*this_).next = next;
36 }
37
38
39 /*
40 Copyright 2021-2026 Andreas Warnke
41
42 Licensed under the Apache License, Version 2.0 (the "License");
43 you may not use this file except in compliance with the License.
44 You may obtain a copy of the License at
45
46 http://www.apache.org/licenses/LICENSE-2.0
47
48 Unless required by applicable law or agreed to in writing, software
49 distributed under the License is distributed on an "AS IS" BASIS,
50 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
51 See the License for the specific language governing permissions and
52 limitations under the License.
53 */