eschnett / Ncurses.jl

Julia wrapper of the famous ncurses library
MIT License
2 stars 1 forks source link

Generate code with `-DNCURSES_NOMACROS` flag #3

Open fatteneder opened 1 week ago

fatteneder commented 1 week ago

While trying to understand how to implement mvwaddstr I stumbled upon the NCURSES_NOMACROS flag.

When generating the bindings locally with this flag it seems to generate most of the epilogue.jl additions and more (e.g. also mvwaddstr).

Is there any reason to avoid that flag, or should I open a PR?

eschnett commented 1 week ago

Are you suggesting to use this when building the Ncurses binaries? The documentation states "The program will run more slowly", which could be a contraindication. Or would this be a flag that's only used when generating the bindings?

fatteneder commented 6 days ago

Sorry, I was only referring to the binding generation, i.e. add push!(args, "-DNCURSES_NOMACROS") to gen/generator.jl.

These functions appear to be already be included in the lib, and so its just a matter of generating the bindings and calling them. I have no idea how much performance impact that would have, but the list of generated bindings would be more complete, I think.

eschnett commented 6 days ago

That sounds fine. Calling Ncurses from Julia will always have a bit more overhead and I'm not worried about this.