syoyo / tinyobjloader-c

Header only tiny wavefront .obj loader in pure C99
412 stars 60 forks source link

Memory allocation macros #21

Closed AgentOak closed 5 years ago

AgentOak commented 5 years ago

Allows the user to replace the functions used to allocate and free memory.

This change is backwards-compatible; if the macros are not defined by the user, the same functions as before are used.

Only allow to either define all or none of them to make sure the user does not forget one of them.

This addresses half of #8.

EDIT: Force-pushed the commit to fix a typo.

syoyo commented 5 years ago

Thanks! merged!