Software / code / prosody
Comparison
core/modulemanager.lua @ 748:172c43d735e9
modulemanager: Really fix call_module_method to work properly
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 29 Jan 2009 02:01:09 +0000 |
| parent | 747:40837f3422ab |
| child | 758:b1885732e979 |
comparison
equal
deleted
inserted
replaced
| 747:40837f3422ab | 748:172c43d735e9 |
|---|---|
| 233 return type(module.module[method]) == "function"; | 233 return type(module.module[method]) == "function"; |
| 234 end | 234 end |
| 235 | 235 |
| 236 function call_module_method(module, method, ...) | 236 function call_module_method(module, method, ...) |
| 237 if module_has_method(module, method) then | 237 if module_has_method(module, method) then |
| 238 local f = module.module[func]; | 238 local f = module.module[method]; |
| 239 return pcall(f, ...); | 239 return pcall(f, ...); |
| 240 else | 240 else |
| 241 return false, "no-such-method"; | 241 return false, "no-such-method"; |
| 242 end | 242 end |
| 243 end | 243 end |