Wed, 27 Feb 2013 11:37:27 +0100
removed brain-afk code
ucx/dlist.c | file | annotate | diff | comparison | revisions | |
ucx/dlist.h | file | annotate | diff | comparison | revisions | |
ucx/list.c | file | annotate | diff | comparison | revisions | |
ucx/list.h | file | annotate | diff | comparison | revisions | |
ucx/ucx.h | file | annotate | diff | comparison | revisions |
--- a/ucx/dlist.c Wed Feb 27 10:57:40 2013 +0100 +++ b/ucx/dlist.c Wed Feb 27 11:37:27 2013 +0100 @@ -67,7 +67,7 @@ return nl; } -UcxDlist *ucx_dlist_concat(UcxDlist *restrict l1, UcxDlist *restrict l2) { +UcxDlist *ucx_dlist_concat(UcxDlist *l1, UcxDlist *l2) { if (l1 == NULL) { return l2; } else {
--- a/ucx/dlist.h Wed Feb 27 10:57:40 2013 +0100 +++ b/ucx/dlist.h Wed Feb 27 11:37:27 2013 +0100 @@ -15,8 +15,8 @@ typedef struct UcxDlist UcxDlist; struct UcxDlist { void *data; - UcxDlist *restrict next; - UcxDlist *restrict prev; + UcxDlist *next; + UcxDlist *prev; }; UcxDlist *ucx_dlist_clone(UcxDlist *l, copy_func fnc, void* data); @@ -26,7 +26,7 @@ void ucx_dlist_free(UcxDlist *l); UcxDlist *ucx_dlist_append(UcxDlist *l, void *data); UcxDlist *ucx_dlist_prepend(UcxDlist *l, void *data); -UcxDlist *ucx_dlist_concat(UcxDlist *restrict l1, UcxDlist *restrict l2); +UcxDlist *ucx_dlist_concat(UcxDlist *l1, UcxDlist *l2); UcxDlist *ucx_dlist_last(const UcxDlist *l); UcxDlist *ucx_dlist_get(const UcxDlist *l, int index); size_t ucx_dlist_size(const UcxDlist *l);
--- a/ucx/list.c Wed Feb 27 10:57:40 2013 +0100 +++ b/ucx/list.c Wed Feb 27 11:37:27 2013 +0100 @@ -64,7 +64,7 @@ return nl; } -UcxList *ucx_list_concat(UcxList *restrict l1, UcxList *restrict l2) { +UcxList *ucx_list_concat(UcxList *l1, UcxList *l2) { if (l1 == NULL) { return l2; } else {
--- a/ucx/list.h Wed Feb 27 10:57:40 2013 +0100 +++ b/ucx/list.h Wed Feb 27 11:37:27 2013 +0100 @@ -25,7 +25,7 @@ void ucx_list_free(UcxList *l); UcxList *ucx_list_append(UcxList *l, void *data); UcxList *ucx_list_prepend(UcxList *l, void *data); -UcxList *ucx_list_concat(UcxList *restrict l1, UcxList *restrict l2); +UcxList *ucx_list_concat(UcxList *l1, UcxList *l2); UcxList *ucx_list_last(const UcxList *l); UcxList *ucx_list_get(const UcxList *l, int index); size_t ucx_list_size(const UcxList *l);
--- a/ucx/ucx.h Wed Feb 27 10:57:40 2013 +0100 +++ b/ucx/ucx.h Wed Feb 27 11:37:27 2013 +0100 @@ -21,16 +21,6 @@ #define UCX_FOREACH(type,list,elem) \ for (type elem = list ; elem != NULL ; elem = elem->next) -#ifdef __cplusplus -#define ucx_dynarray_new(type,identifier,length)\ - type* identifier; identifier = new type[length] -#define ucx_dynarray_free(identifier) delete [] identifier -#else -#define ucx_dynarray_new(type,identifier,length)\ - type identifier[length] -#define ucx_dynarray_free(identifier) -#endif - /* element1,element2,custom data -> {-1,0,1} */ typedef int(*cmp_func)(void*,void*,void*);