A callback is a Lua function called from C, so you can't yield across boundaries like that. It's the same as e.g. yielding from a function passed to string.gsub. 2013/11/29 Geoff Leyland <geoff_leyland@xxxxxxxxxxx> > Hi, > > Just a quick check: am I right in thinking you can’t yield from inside a > callback? I ask because it’s quite possible that the "attempt to yield > across C-call boundary” error could come from some other mistake I’ve made. > > (I’ve got a callback-style C API that would be nice to turn into an > iterator, but it’s not a problem if it can’t be done) > > Cheers, > Geoff > > >