m-schmoock / lcpp

A Lua C PreProcessor
130 stars 21 forks source link

Path finder added #18

Closed v1993 closed 8 years ago

v1993 commented 8 years ago

This patch provide find in filesystem, not only in current directory.

To set system patches, use lcpp.PATH as in example: "/usr/include;/usr/local/include;/include"

v1993 commented 8 years ago

Maybe, this commit provide better realisation, than previous.

umegaya commented 8 years ago

@v1993 please read our discussion for previous version of your patch.

if you want to add path finder, please do not widely change existing function signature. because it may break existing code base which uses this library (also this kind of change ends up with endlessly changing lcpp.compileFile signature, which seems to be bad idea).

instead of it, implement object factory which can receive path finder function via configuration table, and create object which internally uses existing lcpp APIs and provided path finder. resulting code will be like merging snippet in following 2 comments.

https://github.com/m-schmoock/lcpp/pull/18#discussion_r68344452 https://github.com/m-schmoock/lcpp/pull/18#discussion_r68498555

v1993 commented 8 years ago

I can't understand your code at level required to do as you said. But this opportunity is very important.