[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Making luaconf.h settings available in Lua
- From: Reuben Thomas <rrt@...>
- Date: Sat, 26 Feb 2011 23:22:48 +0000
On 26 February 2011 23:19, David Manura <firstname.lastname@example.org> wrote:
> On Sat, Feb 26, 2011 at 5:54 PM, Reuben Thomas <email@example.com> wrote:
>> [on package.config] What's wrong with a table?
> Also asked in .
>  http://lua-users.org/lists/lua-l/2010-06/msg00193.html
Indeed, and not answered.
I've just added the following interface to stdlib's io_ext module:
-- Reflect package.config (undocumented in 5.1; see luaconf.h for C
_, _, dirsep, pathsep, path_mark, execdir, igmark =
(note that strictly you can't just index the string: there's nothing
to guarantee that each "element" is a single character)
This means that I can now use
io.dirsep, io.pathsep, io.path_mark, io.execdir, io.igmark
Following the principle of least surprise, the names are just
lower-cased versions of the macros in luaconf.h.
Release in a few minutes!