mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-31 03:31:36 +01:00 
			
		
		
		
	* resultname changed to pshortstring
git-svn-id: trunk@5295 -
This commit is contained in:
		
							parent
							
								
									7781e842fc
								
							
						
					
					
						commit
						13f359aa80
					
				| @ -200,6 +200,7 @@ implementation | |||||||
|         vs       : tlocalvarsym; |         vs       : tlocalvarsym; | ||||||
|         aliasvs  : tabsolutevarsym; |         aliasvs  : tabsolutevarsym; | ||||||
|         sl       : tpropaccesslist; |         sl       : tpropaccesslist; | ||||||
|  |         hs       : string; | ||||||
|       begin |       begin | ||||||
|         { The result from constructors and destructors can't be accessed directly } |         { The result from constructors and destructors can't be accessed directly } | ||||||
|         if not(pd.proctypeoption in [potype_constructor,potype_destructor]) and |         if not(pd.proctypeoption in [potype_constructor,potype_destructor]) and | ||||||
| @ -220,11 +221,13 @@ implementation | |||||||
|            { insert the name of the procedure as alias for the function result, |            { insert the name of the procedure as alias for the function result, | ||||||
|              we can't use realname because that will not work for compilerprocs |              we can't use realname because that will not work for compilerprocs | ||||||
|              as the name is lowercase and unreachable from the code } |              as the name is lowercase and unreachable from the code } | ||||||
|            if pd.resultname='' then |            if assigned(pd.resultname) then | ||||||
|             pd.resultname:=pd.procsym.name; |              hs:=pd.resultname^ | ||||||
|  |            else | ||||||
|  |              hs:=pd.procsym.name; | ||||||
|            sl:=tpropaccesslist.create; |            sl:=tpropaccesslist.create; | ||||||
|            sl.addsym(sl_load,pd.funcretsym); |            sl.addsym(sl_load,pd.funcretsym); | ||||||
|            aliasvs:=tabsolutevarsym.create_ref(pd.resultname,pd.returndef,sl); |            aliasvs:=tabsolutevarsym.create_ref(hs,pd.returndef,sl); | ||||||
|            include(aliasvs.varoptions,vo_is_funcret); |            include(aliasvs.varoptions,vo_is_funcret); | ||||||
|            tlocalsymtable(pd.localst).insert(aliasvs); |            tlocalsymtable(pd.localst).insert(aliasvs); | ||||||
| 
 | 
 | ||||||
| @ -1051,7 +1054,7 @@ implementation | |||||||
|                     end |                     end | ||||||
|                   else |                   else | ||||||
|                     begin |                     begin | ||||||
|                       pd.resultname:=orgpattern; |                       pd.resultname:=stringdup(orgpattern); | ||||||
|                       consume(_ID); |                       consume(_ID); | ||||||
|                     end; |                     end; | ||||||
|                   if not try_to_consume(_COLON) then |                   if not try_to_consume(_COLON) then | ||||||
|  | |||||||
| @ -439,7 +439,7 @@ interface | |||||||
|           libsymderef : tderef; |           libsymderef : tderef; | ||||||
| {$endif powerpc or m68k} | {$endif powerpc or m68k} | ||||||
|           { name of the result variable to insert in the localsymtable } |           { name of the result variable to insert in the localsymtable } | ||||||
|           resultname : TIDString; |           resultname : pshortstring; | ||||||
|           { true, if the procedure is only declared |           { true, if the procedure is only declared | ||||||
|             (forward procedure) } |             (forward procedure) } | ||||||
|           forwarddef, |           forwarddef, | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 peter
						peter