[Dev-luatex] procedural vs. object interface to kpathsea

T T t34www at googlemail.com
Wed Dec 2 13:03:19 CET 2009

2009/12/2 Taco Hoekwater <taco at elvenkind.com>:
> The object interface gives you a kpse object that is totally
> separate from luatex, the procedural interface reuses the kpse
> that luatex itself uses for its own lookups.

Thanks for explaining this.

> Whether the distinction matters to you depends on what you want
> to do.

I'm working on a script wrapper for TL that runs under texlua. As an
optimization I want to call (tex)lua scripts directly with dofile to
avoid spawning new processes, but I want to make sure that
kpse.set_program_name from my wrapper doesn't impact the invoked
script in any way.

As I understand in this scenario it will be better to use kpse object
and keep it local. Does this incur any performance penalty, i.e. does
kpathsea reinitializes itself from scratch when my object goes out of
scope and set_program_name is called again?



More information about the dev-luatex mailing list