Check for Python options before functions

This commit is contained in:
John Wiegley 2009-11-08 13:36:16 -05:00
parent 188bf10b6c
commit 6005975006

View file

@ -297,6 +297,9 @@ expr_t::ptr_op_t python_interpreter_t::lookup(const symbol_t::kind_t kind,
switch (kind) { switch (kind) {
case symbol_t::FUNCTION: case symbol_t::FUNCTION:
if (option_t<python_interpreter_t> * handler = lookup_option(name.c_str()))
return MAKE_OPT_FUNCTOR(python_interpreter_t, handler);
if (is_initialized && main_nspace.has_key(name.c_str())) { if (is_initialized && main_nspace.has_key(name.c_str())) {
DEBUG("python.interp", "Python lookup: " << name); DEBUG("python.interp", "Python lookup: " << name);