Continue working on pipeline

This commit is contained in:
Piotr Krygier committed 2025-06-20 13:44:33 +02:00
1 parent 45be08019e
commit bd05c03a12
28 files changed
+453 -423

No files matched your search

+10 -10
View File
@@ -30,21 +30,21 @@
}
#define RSE_LINKED_LIST_PUSH_FRONT(list, value) \
typeof(list) new_node = NULL; \
__typeof__(list) new_node = NULL; \
rse_malloc(new_node, sizeof(*(list))); \
new_node->data = value; \
new_node->next = list; \
list = new_node
#define RSE_LINKED_LIST_PUSH_BACK(list, value) \
typeof(list) new_node = NULL; \
__typeof__((list)) new_node = NULL; \
rse_malloc(new_node, sizeof(*(list))); \
new_node->data = value; \
new_node->next = NULL; \
if (list == NULL) { \
list = new_node; \
} else { \
typeof(list) current = list; \
__typeof__(list) current = list; \
while (current->next != NULL) { \
current = current->next; \
} \
@@ -53,7 +53,7 @@
#define RSE_LINKED_LIST_POP_FRONT(list) \
if (list != NULL) { \
typeof(list) temp = list; \
__typeof__(list) temp = list; \
list = list->next; \
rse_free(temp); \
}
@@ -64,7 +64,7 @@
rse_free(list); \
list = NULL; \
} else { \
typeof(list) *current = list; \
__typeof__(list) *current = list; \
while (current->next->next != NULL) { \
current = current->next; \
} \
@@ -78,7 +78,7 @@
#define RSE_LINKED_LIST_BACK(list) \
if (list != NULL) { \
typeof(list) *current = list; \
__typeof__(list) *current = list; \
while (current->next != NULL) { \
current = current->next; \
} \
@@ -91,7 +91,7 @@
#define RSE_LINKED_LIST_SIZE(list) \
({ \
int size = 0; \
typeof(list) current = list; \
__typeof__(list) current = list; \
while (current != NULL) { \
size++; \
current = current->next; \
@@ -101,17 +101,17 @@
#define RSE_LINKED_LIST_CLEAR(list) \
while (list != NULL) { \
typeof(list) temp = list; \
__typeof__(list) temp = list; \
list = list->next; \
rse_free(temp); \
}
#define RSE_LINKED_LIST_FOREACH(list, i) \
for (typeof(list) i = list; i != NULL; i = i->next)
for (__typeof__(list) i = list; i != NULL; i = i->next)
#define RSE_LINKED_LIST_FOREACH_REVERSE(list, i) \
for (typeof(list) i = list; i != NULL; i = i->next)
for (__typeof__(list) i = list; i != NULL; i = i->next)
#define RSE_LINKED_LIST_TO_ARRAY(list, array) \
({ \