Changeset 5 in dev for BasicCompiler_Common/hash.cpp


Ignore:
Timestamp:
Dec 5, 2006, 1:42:16 AM (18 years ago)
Author:
dai_9181
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler_Common/hash.cpp

    r4 r5  
    44#include "../BasicCompiler64/opcode.h"
    55#else
    6 #include "../BasicCompiler/opcode.h"
     6#include "../BasicCompiler32/opcode.h"
    77#endif
    88
     
    264264    //一つ以上の関数が存在するときは内部エラー(デバッグ用)
    265265    if(num > 1){
    266         SetError(300,NULL,cp);
     266        if(bError) SetError(300,NULL,cp);
    267267    }
    268268
    269269    psi = ppsi[0];
    270270
    271     free(ppsi);
     271    HeapDefaultFree(ppsi);
    272272
    273273    return psi;
    274274}
     275SUBINFO *GetMethodHash(char *ObjectName,char *MethodName,char *Parameter,BOOL bError){
     276    char temporary[VN_SIZE];
     277    sprintf(temporary,"%s.%s",ObjectName,MethodName);
     278
     279    int num;
     280    SUBINFO **ppsi,*psi;
     281    ppsi = GetOverloadSubHash(temporary,&num);
     282
     283    //関数が存在しないとき
     284    if(num == 0){
     285        HeapDefaultFree(ppsi);
     286        return 0;
     287    }
     288
     289    //オーバーロードを解決
     290    psi=OverloadSolutionWithStrParam(temporary,ppsi,num,Parameter,ObjectName,NULL);
     291    HeapDefaultFree(ppsi);
     292
     293    return psi;
     294}
Note: See TracChangeset for help on using the changeset viewer.