Skip to content

Commit

Permalink
symb: Allow symbGetDefaultParamMode() dtype param to have CONST bits
Browse files Browse the repository at this point in the history
  • Loading branch information
dkl committed Mar 17, 2014
1 parent 8f553ea commit f0eeaf3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/compiler/parser-decl-proc-params.bas
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ private function hParamDecl _
'' we have to delay the true default until now, since
'' byval/byref depends on the symbol type
if( use_default ) then
mode = symbGetDefaultParamMode( typeGetDtAndPtrOnly( dtype ), subtype )
mode = symbGetDefaultParamMode( dtype, subtype )
end if
end if

Expand Down
6 changes: 2 additions & 4 deletions src/compiler/symb-proc.bas
Original file line number Diff line number Diff line change
Expand Up @@ -2777,7 +2777,7 @@ private sub hParamsToStr( byref s as string, byval proc as FBSYMBOL ptr )
'' always include Byval/Byref in that case, otherwise it'd depend on
'' source code context.
if( fbLangIsSet( FB_LANG_FB ) and _
(symbGetDefaultParamMode( symbGetType( param ), param->subtype ) <> parammode) ) then
(symbGetDefaultParamMode( param->typ, param->subtype ) <> parammode) ) then
if( parammode = FB_PARAMMODE_BYVAL ) then
s += "byval "
else
Expand Down Expand Up @@ -2878,9 +2878,7 @@ function symbGetDefaultParamMode _
byval subtype as FBSYMBOL ptr _
) as integer

'' assumes dtype has const info stripped

select case as const dtype
select case as const( typeGetDtAndPtrOnly( dtype ) )
case FB_DATATYPE_FWDREF, _
FB_DATATYPE_FIXSTR, FB_DATATYPE_STRING, _
FB_DATATYPE_CHAR, FB_DATATYPE_WCHAR, _
Expand Down

0 comments on commit f0eeaf3

Please sign in to comment.