lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Fri, Nov 21, 2008 at 9:36 AM, Florian Weimer <> wrote:
> Let's assume that expat's XML_Parse function is called directly.  Then
> the L in the userdata object is not updated and may have become
> invalid (if it's not from the master state, for example).
> It might sound a bit silly for expat, but for other cases (like
> user-defined functions in SQLite) it's not that far-fetched, IMHO.

Its totally unclear to me what you are talking about.

This function exists so expat can be bound to lua and used in lua (or
C code called from lua, same thing), right?

All running lua code exists within the context of a lua state. If
there is no valid lua state.... its not lua. If its not lua, why would
you be calling expat directly on a lua user data? And how did you get
it, anyhow?

Maybe you should just try to do whatever it is you are trying to do,
and see if it works?

If it doesn't you can explain what the trouble is, and someone will
surely help you.

Btw, if you think this is an issue for something like user-defined
functions in sqlite, maybe try reading the sqlite bindings, the docs
indicate they do user-defined functions: