Martin Rodriguez Reboredo
Martin Rodriguez Reboredo
The point is that the building of SHADERed with system glslang and pugixml can permit the Unix-like distributions to package the software as it won't collide with the installations of...
What about thread safety? I've found that using that using a `static` struct doesn't lead to a major architecture change or a rewrite of the library.
I'm worried about changing the allocation methods during application runtime, but I think is much clever to mention that is unwise to change the methods that often.
I was using this struct for my prototypes. ``` c typedef struct gdallochelpers { void *(*callocf)(size_t nmemb, size_t size); void *(*mallocf)(size_t size); void *(*reallocf)(void *ptr, size_t size); void (*freef)(void *ptr);...
An API could be described like this: ``` c gdSetMemoryCallocMethod(void *(*callocf)(size_t nmemb, size_t size)); gdSetMemoryMallocMethod(void *(*mallocf)(size_t size)); gdSetMemoryReallocMethod(void *(*reallocf)(void *ptr, size_t size)); gdSetMemoryFreeMethod(void (*freef)(void *ptr)); gdSetMemoryAllocationMethods(gdAllocHelper helper); ``` Error handling...
The purpose of the struct was more of a holder for the methods, but any other solution could be used instead. The `gdSetMemoryAllocationMethods` should be used to set the methods...
You welcome. Pinging @vapier for review.
Maybe `reallocf` is not a [good name](https://linux.die.net/man/3/reallocf).
Running the test with CMake works just fine but not with Autotools 🤔 .
From what was discussed in the issue we can go either ways with the static struct or the vars, but I'll stick with the latter for the moment. Speaking about...