matusnovak / wrenbind17

A header only library for binding C++17 classes and functions to Wren, an embeddable programming language
https://matusnovak.github.io/wrenbind17
MIT License
65 stars 10 forks source link

Update default reallocateFn & loadModuleFn to match new wren 0.4.0 signatures #3

Closed PossiblyAShrub closed 3 years ago

PossiblyAShrub commented 3 years ago

Wren 0.4.0 is currently in pre-release. It introduces two breaking API changes, this patch updates both of the affected default Wren VM config functions (reallocateFn & loadModuleFn.)

I have started using Wren 0.4.0 in my projects, however, perhaps we should wait until the full release before merging? Thank you for the wonderful library!

matusnovak commented 3 years ago

Hi @PossiblyAShrub

Thanks for the fix! Don't worry about the failing GitHub actions for now.

It would be possible to do #if version of Wren >= 0.4.0 ... new code ... #else ... old code ... #endif based on this: https://github.com/wren-lang/wren/blob/main/src/include/wren.h#L9-L11 That way, depending on what version of Wren is used, this patch would be compiled or skipped.

I will have a look at this either today or tomorrow to propose some changes.

matusnovak commented 3 years ago

Awesome! Thank you.