Update examples.

This commit is contained in:
TryExceptElse committed 2019-11-22 00:11:01 -08:00
1 parent f388ed6808
commit db7af704a6
39 files changed
+278 -169

No files matched your search

+5 -2
View File
@@ -15,7 +15,10 @@ static int intcmp(int a, int b)
return a - b;
}
HEAP_GENERATE(h, heap, static, int)
CMC_GENERATE_HEAP(h, heap, int)
typedef struct heap heap;
typedef struct heap_iter heap_iter;
int main(int argc, char const *argv[])
{
@@ -49,7 +52,7 @@ int main(int argc, char const *argv[])
}
free(buff);
h_free(h);
h_free(h, NULL);
return 0;
}
+5 -2
View File
@@ -19,7 +19,10 @@ int intcmp(int a, int b)
}
// Creates a heap of integers
HEAP_GENERATE(h, heap, /* FMOD */, int)
CMC_GENERATE_HEAP(h, heap, int);
typedef struct heap heap;
typedef struct heap_iter heap_iter;
int main(int argc, char const *argv[])
{
@@ -175,7 +178,7 @@ int main(int argc, char const *argv[])
// Dispose the iterator called by h_iter_new()
h_iter_free(iter);
// Dispose the heap created
h_free(my_heap);
h_free(my_heap, NULL);
return 0;
}