Projects

Ticket #723: patch.diff

File patch.diff, 0.8 KB (added by martinlagardette@…, 21 months ago)
  • vm.h

     
    556556        } rcall; 
    557557        struct { 
    558558            IMP imp; 
     559            int argc; 
    559560            bs_element_method_t *bs_method;      
    560561            rb_vm_objc_stub_t *stub; 
    561562        } ocall; 
  • dispatcher.cpp

     
    501501    cache->sel = sel; 
    502502    cache->klass = klass; 
    503503    cache->as.ocall.imp = imp; 
     504    cache->as.ocall.argc = argc; 
    504505    cache->as.ocall.bs_method = GET_CORE()->find_bs_method(klass, sel); 
    505506 
    506507    char types[200]; 
     
    829830        return v; 
    830831    } 
    831832    else if (cache->flag & MCACHE_OCALL) { 
     833        if (cache->as.ocall.argc != argc) { 
     834            goto recache; 
     835        } 
    832836        if (!cache_method) { 
    833837            cache->flag = 0; 
    834838        }