starwing / lua-protobuf

A Lua module to work with Google protobuf
MIT License
1.74k stars 387 forks source link

Fix for embedded system #234

Open surfskidude opened 1 year ago

surfskidude commented 1 year ago

I am using lua-protobuf on an RTOS powered microcontroller with nonstandard allocator and no file IO. I have not modified the C code logic in any way, I have just added some macros to make it possible to build the code. I have attached my version and was hoping you could incorporate the changes into your version. I have added options for excluding the file IO API and made it possible to use a different allocator. All changes I have done, including moving where lua.h is included, were required for my build. pb.tar.gz

starwing commented 1 year ago

Thanks for contribution! you could just send a Pull Request for me, and I'll be very happy to merge it!

surfskidude commented 1 year ago

I sent a Pull Request. Let me know if the changes are acceptable.