summaryrefslogtreecommitdiffstatshomepage
path: root/py/runtime.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-03-26 20:15:40 +0000
committerDamien George <damien.p.george@gmail.com>2014-03-26 20:15:40 +0000
commitc12b2213c16ba8839981c362c4d5f133a84b374b (patch)
tree59e3de4cce2ab28a9d4f73ba70477be98fb3c353 /py/runtime.c
parent69b3ba0df38e276b55f8f76e7f5276723e6d3abe (diff)
downloadmicropython-c12b2213c16ba8839981c362c4d5f133a84b374b.tar.gz
micropython-c12b2213c16ba8839981c362c4d5f133a84b374b.zip
Change mp_method_t.name from const char * to qstr.
Addresses issue #377.
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/runtime.c b/py/runtime.c
index cc5398552e..247a78fe1a 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -847,8 +847,8 @@ STATIC void rt_load_method_maybe(mp_obj_t base, qstr attr, mp_obj_t *dest) {
// this is a lookup in the object (ie not class or type)
const mp_method_t *meth = type->methods;
if (meth != NULL) {
- for (; meth->name != NULL; meth++) {
- if (strcmp(meth->name, qstr_str(attr)) == 0) {
+ for (; meth->name != MP_QSTR_NULL; meth++) {
+ if (meth->name == attr) {
// check if the methods are functions, static or class methods
// see http://docs.python.org/3.3/howto/descriptor.html
if (MP_OBJ_IS_TYPE(meth->fun, &mp_type_staticmethod)) {