[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Polymorphic luaL_checkudata?
- From: "Mark Edgar" <medgar123@...>
- Date: Mon, 16 Apr 2007 10:35:37 -0700
On 4/15/07, Peter Odding <firstname.lastname@example.org> wrote:
You don't think it's bad style to add (get|set)_timeout to the file userdata
methods? Not trying to criticize, just interested in your opinion.
Not as long as your new methods fail properly when called with
non-pipes. If you want to integrate pipes so that they can be used
wherever a file is expected (and this seems a good thing) then you
must use the same metatable.
This is basically the same thing I've done with pipes in the "ex" API
too, by the way. It might be nice if there was also an API which did
the same thing for network connections too.
Note that I know nothing at all about APR and its abstractions. It
might not make sense to attempt to unify the APR API and the Lua API.