jgabaut / koliseo

An arena allocator library in C.
https://jgabaut.github.io/koliseo-docs
GNU General Public License v3.0
5 stars 0 forks source link

Added LIST_allocator API #74

Closed khushal-banks closed 5 months ago

khushal-banks commented 5 months ago

This API is used in LIST_cons_gl() to allocate list memory. Also, added error handling logic for this API.

Now, LIST_DEFAULT_ALLOCF macro can be used to replace memory allocation function for LIST header (default value: malloc)

These changes are an attempt to resolve #69

Modified LIST_HEADER_VERSION to 0.1.1

khushal-banks commented 5 months ago

The changes are well meant and make sense, but I can't accept this as of now because I don't yet know how I'd prep the new API

No problem. Just close this as invalid or not-planned. Please, Don't keep it hanging as open.

Also, I am not sure if following in this PR were necessary:

#define LIST_allocator LIST_IMPL(allocator)
#undef LIST_allocator

This change is not planned for very soon. At the moment, I'm not sure how to proceed on this. I hope you can understand.

Yes i can understand. I was also feeling that something is missing while submitting this PR.

jgabaut commented 5 months ago

Thanks for understanding. In a close future when the wanted API design is more clear, we can work this out.