lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I did that to just make this header only - like https://github.com/nothings/stb

the printf is needed for my case, yes, you can stream this to a string buffer, can use different printf functions (like on android, or sdl - just give it a printf compatible function pointer)

the inline was just there to skip the extra extern declaration. but this was added in the meanwhile.

but other than the style that you apparently don't like - any useful feedback? ;)


On Mon, Oct 10, 2016 at 5:22 PM, Marc Balmer <marc@msys.ch> wrote:
Hi.

I was looking for a way to do stackdumps from within C/C++ - I couldn't find anything that also prints tables.

That's why I did this small helper header file: https://github.com/mgerhardy/lua_stackdump

Feedback is more than welcome. Pull requests, too ;). I'm quite new to lua, so please let me know if you can find anything wrong. There are also a few TODO comments included - if someone could help me to solve them... please do

Looks like you're new to C/C++ as well... (SCNR).  It is not so common to put code in .h files.  Also, passing around the printing function, is that really needed?

And, overuse of brackets...  And why inline?

Other than that, nice that you put it on guthub.




--
http://www.caveproductions.org