From 27d340a59f3b1aaa040c85882d1b6b18cbbaa164 Mon Sep 17 00:00:00 2001 From: "A.Bachvaroff" Date: Tue, 9 Aug 2011 21:21:55 +0300 Subject: [PATCH] Fix to allow passing Python callable objects as functions --- src/pythoninlua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pythoninlua.c b/src/pythoninlua.c index c3309c1..6a6dfc8 100644 --- a/src/pythoninlua.c +++ b/src/pythoninlua.c @@ -163,7 +163,7 @@ int py_convert(lua_State *L, PyObject *o, int withnone) asindx = 1; ret = py_convert_custom(L, o, asindx); if (ret && !asindx && - (PyFunction_Check(o) || PyCFunction_Check(o))) + (PyFunction_Check(o) || PyCFunction_Check(o) || PyCallable_Check(o))) lua_pushcclosure(L, py_asfunc_call, 1); } return ret;