Changeset 78 in dev for BasicCompiler_Common/Subroutine.cpp
- Timestamp:
- Mar 25, 2007, 2:47:49 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/Subroutine.cpp
r75 r78 180 180 GetVarType(fullCallName,type,false); 181 181 182 extern ProcPointer **ppProcPointer; 183 ProcPointer *pProcPtr = ppProcPointer[type.GetIndex()]; 182 ProcPointer *pProcPtr = House::procPointers[type.GetIndex()]; 184 183 resultType = pProcPtr->ReturnType(); 185 184 … … 768 767 /////////////////////// 769 768 770 int AddProcPtrInfo( char *buffer, DWORD dwProcType, int nowLine ){ 769 int AddProcPtrInfo( const string &typeExpression, int nowLine ){ 770 DWORD dwProcType = (DWORD)typeExpression[2]; 771 const string ¶mStr = typeExpression.substr( 3 ); 771 772 772 773 Procedure::Kind kind = Procedure::Sub; … … 778 779 779 780 //buffer[0]は'('となっている 780 pProcPointer->SetParamsAndReturnType( buffer, nowLine ); 781 782 extern ProcPointer **ppProcPointer; 783 extern int ProcPtrInfoNum; 784 ppProcPointer=(ProcPointer **)HeapReAlloc(hHeap,0,ppProcPointer,(ProcPtrInfoNum+1)*sizeof(ProcPointer *)); 785 ppProcPointer[ProcPtrInfoNum] = pProcPointer; 786 ProcPtrInfoNum++; 787 788 return ProcPtrInfoNum-1; 781 pProcPointer->SetParamsAndReturnType( paramStr.c_str(), nowLine ); 782 783 House::procPointers.push_back( pProcPointer ); 784 785 return House::procPointers.size()-1; 789 786 } 790 787 void DeleteProcPtrInfo(void){ 791 extern ProcPointer **ppProcPointer; 792 extern int ProcPtrInfoNum; 793 794 for(int i=0;i<ProcPtrInfoNum;i++){ 795 delete ppProcPointer[i]; 796 } 797 798 HeapDefaultFree(ppProcPointer); 799 } 788 BOOST_FOREACH( ProcPointer *pProcPointer, House::procPointers ){ 789 delete pProcPointer; 790 } 791 792 House::procPointers.clear(); 793 }
Note:
See TracChangeset
for help on using the changeset viewer.