Skip to content

Commit

Permalink
rtl-const: add const to rtl-error prototypes
Browse files Browse the repository at this point in the history
  • Loading branch information
jayrm committed Aug 12, 2018
1 parent 86a9f4f commit a8eface
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 65 deletions.
112 changes: 56 additions & 56 deletions src/compiler/rtl-error.bas
Expand Up @@ -12,42 +12,42 @@
{ _
/' function fb_ErrorThrowAt cdecl _
( _
byval linenum as long, _
byval fname as zstring ptr, _
byval reslabel as any ptr, _
byval resnxtlabel as any ptr _
byval linenum as const long, _
byval fname as const zstring ptr, _
byval reslabel as const any ptr, _
byval resnxtlabel as const any ptr _
) as FB_ERRHANDLER '/ _
( _
@FB_RTL_ERRORTHROW, NULL, _
typeAddrOf( FB_DATATYPE_VOID ), FB_FUNCMODE_CDECL, _
NULL, FB_RTL_OPT_NONE, _
4, _
{ _
( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( FB_DATATYPE_CHAR ), FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ) _
( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( typeSetIsConst( FB_DATATYPE_CHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( typeSetIsConst( FB_DATATYPE_VOID ) ), FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( typeSetIsConst( FB_DATATYPE_VOID ) ), FB_PARAMMODE_BYVAL, FALSE ) _
} _
), _
/' function fb_ErrorThrowEx cdecl _
( _
byval errnum long, _
byval linenum as long, _
byval fname as zstring ptr, _
byval reslabel as any ptr, _
byval resnxtlabel as any ptr _
byval errnum as const long, _
byval linenum as const long, _
byval fname as const zstring ptr, _
byval reslabel as const any ptr, _
byval resnxtlabel as const any ptr _
) as FB_ERRHANDLER '/ _
( _
@FB_RTL_ERRORTHROWEX, NULL, _
typeAddrOf( FB_DATATYPE_VOID ), FB_FUNCMODE_CDECL, _
NULL, FB_RTL_OPT_NONE, _
5, _
{ _
( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( FB_DATATYPE_CHAR ),FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( FB_DATATYPE_VOID ),FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( FB_DATATYPE_VOID ),FB_PARAMMODE_BYVAL, FALSE ) _
( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ), _
( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( typeSetIsConst( FB_DATATYPE_CHAR ) ),FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( typeSetIsConst( FB_DATATYPE_VOID ) ),FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( typeSetIsConst( FB_DATATYPE_VOID ) ),FB_PARAMMODE_BYVAL, FALSE ) _
} _
), _
/' function fb_ErrorSetHandler( byval newhandler as FB_ERRHANDLER ) as FB_ERRHANDLER '/ _
Expand All @@ -67,14 +67,14 @@
NULL, FB_RTL_OPT_NONE, _
0 _
), _
/' function fb_ErrorSetNum( byval errnum as long ) as long '/ _
/' function fb_ErrorSetNum( byval errnum as const long ) as long '/ _
( _
@FB_RTL_ERRORSETNUM, NULL, _
FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
NULL, FB_RTL_OPT_NONE, _
1, _
{ _
( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ) _
( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
} _
), _
/' function fb_ErrorResume cdecl( ) as any ptr '/ _
Expand Down Expand Up @@ -112,100 +112,100 @@
NULL, FB_RTL_OPT_NOQB, _
0 _
), _
/' function fb_ErrorSetModName( byval mod_name as zstring ptr ) as zstring ptr '/ _
/' function fb_ErrorSetModName( byval mod_name as const zstring ptr ) as zstring ptr '/ _
( _
@FB_RTL_ERRORSETMODNAME, NULL, _
typeAddrOf( FB_DATATYPE_CHAR ), FB_FUNCMODE_FBCALL, _
NULL, FB_RTL_OPT_NONE, _
1, _
{ _
( typeAddrOf( FB_DATATYPE_CHAR ),FB_PARAMMODE_BYVAL, FALSE ) _
( typeAddrOf( typeSetIsConst( FB_DATATYPE_CHAR ) ),FB_PARAMMODE_BYVAL, FALSE ) _
} _
), _
/' function fb_ErrorSetFuncName( byval fun_name as zstring ptr ) as zstring ptr '/ _
/' function fb_ErrorSetFuncName( byval fun_name as const zstring ptr ) as zstring ptr '/ _
( _
@FB_RTL_ERRORSETFUNCNAME, NULL, _
typeAddrOf( FB_DATATYPE_CHAR ), FB_FUNCMODE_FBCALL, _
NULL, FB_RTL_OPT_NONE, _
1, _
{ _
( typeAddrOf( FB_DATATYPE_CHAR ),FB_PARAMMODE_BYVAL, FALSE ) _
( typeAddrOf( typeSetIsConst( FB_DATATYPE_CHAR ) ),FB_PARAMMODE_BYVAL, FALSE ) _
} _
), _
/' sub fb_Assert overload _
( _
byval filename as zstring ptr, _
byval linenum as long, _
byval funcname as zstring ptr, _
byval expression as zstring ptr _
byval filename as const zstring ptr, _
byval linenum as const long, _
byval funcname as const zstring ptr, _
byval expression as const zstring ptr _
) '/ _
( _
@"fb_Assert", NULL, _
FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
NULL, FB_RTL_OPT_OVER, _
4, _
{ _
( typeAddrOf( FB_DATATYPE_CHAR ), FB_PARAMMODE_BYVAL, FALSE ), _
( FB_DATATYPE_INTEGER,FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( FB_DATATYPE_CHAR ), FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( FB_DATATYPE_CHAR ), FB_PARAMMODE_BYVAL, FALSE ) _
( typeAddrOf( typeSetIsConst( FB_DATATYPE_CHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( typeSetIsConst( FB_DATATYPE_CHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( typeSetIsConst( FB_DATATYPE_CHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
} _
), _
/' sub fb_Assert overload alias "fb_AssertW" _
( _
byval filename as zstring ptr, _
byval linenum as long, _
byval funcname as zstring ptr, _
byval expression as wstring ptr _
byval filename as const zstring ptr, _
byval linenum as const long, _
byval funcname as const zstring ptr, _
byval expression as const wstring ptr _
) '/ _
( _
@"fb_Assert", @"fb_AssertW", _
FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
NULL, FB_RTL_OPT_OVER, _
4, _
{ _
( typeAddrOf( FB_DATATYPE_CHAR ), FB_PARAMMODE_BYVAL, FALSE ), _
( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( FB_DATATYPE_CHAR ),FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( FB_DATATYPE_WCHAR ),FB_PARAMMODE_BYVAL, FALSE ) _
( typeAddrOf( typeSetIsConst( FB_DATATYPE_CHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( typeSetIsConst( FB_DATATYPE_CHAR ) ),FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ),FB_PARAMMODE_BYVAL, FALSE ) _
} _
), _
/' sub fb_AssertWarn overload _
( _
byval filename as zstring ptr, _
byval linenum as long, _
byval funcname as zstring ptr, _
byval expression as zstring ptr _
byval filename as const zstring ptr, _
byval linenum as const long, _
byval funcname as const zstring ptr, _
byval expression as const zstring ptr _
) '/ _
( _
@"fb_AssertWarn", NULL, _
FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
NULL, FB_RTL_OPT_OVER, _
4, _
{ _
( typeAddrOf( FB_DATATYPE_CHAR ),FB_PARAMMODE_BYVAL, FALSE ), _
( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( FB_DATATYPE_CHAR ),FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( FB_DATATYPE_CHAR ),FB_PARAMMODE_BYVAL, FALSE ) _
( typeAddrOf( typeSetIsConst( FB_DATATYPE_CHAR ) ),FB_PARAMMODE_BYVAL, FALSE ), _
( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( typeSetIsConst( FB_DATATYPE_CHAR ) ),FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( typeSetIsConst( FB_DATATYPE_CHAR ) ),FB_PARAMMODE_BYVAL, FALSE ) _
} _
), _
/' sub fb_AssertWarn overload alias "fb_AssertWarnW" _
( _
byval fname as zstring ptr, _
byval linenum as long, _
byval funcname as zstring ptr, _
byval expression as wstring ptr _
byval fname as const zstring ptr, _
byval linenum as const long, _
byval funcname as const zstring ptr, _
byval expression as const wstring ptr _
) '/ _
( _
@"fb_AssertWarn", @"fb_AssertWarnW", _
FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
NULL, FB_RTL_OPT_OVER, _
4, _
{ _
( typeAddrOf( FB_DATATYPE_CHAR ), FB_PARAMMODE_BYVAL, FALSE ), _
( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( FB_DATATYPE_CHAR ), FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( FB_DATATYPE_WCHAR ), FB_PARAMMODE_BYVAL, FALSE ) _
( typeAddrOf( typeSetIsConst( FB_DATATYPE_CHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( typeSetIsConst( FB_DATATYPE_CHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
} _
), _
/' EOL '/ _
Expand Down
18 changes: 9 additions & 9 deletions tests/warnings/rtl-prototypes.bas
Expand Up @@ -295,13 +295,13 @@

ID( function fb_ErrorThrowAt )
scope
dim chk as function cdecl ( byval as long, byval as zstring ptr, byval as any ptr, byval as any ptr ) as any ptr
dim chk as function cdecl ( byval as const long, byval as const zstring ptr, byval as const any ptr, byval as const any ptr ) as any ptr
chk = procptr( fb_ErrorThrowAt )
end scope

ID( function fb_ErrorThrowEx )
scope
dim chk as function cdecl ( byval as long, byval as long, byval as zstring ptr, byval as any ptr, byval as any ptr ) as any ptr
dim chk as function cdecl ( byval as const long, byval as const long, byval as const zstring ptr, byval as const any ptr, byval as const any ptr ) as any ptr
chk = procptr( fb_ErrorThrowEx )
end scope

Expand All @@ -319,7 +319,7 @@

ID( function fb_ErrorSetNum )
scope
dim chk as function fbcall ( byval as long ) as long
dim chk as function fbcall ( byval as const long ) as long
chk = procptr( fb_ErrorSetNum )
end scope

Expand Down Expand Up @@ -355,37 +355,37 @@

ID( function fb_ErrorSetModName )
scope
dim chk as function fbcall ( byval as zstring ptr ) as zstring ptr
dim chk as function fbcall ( byval as const zstring ptr ) as zstring ptr
chk = procptr( fb_ErrorSetModName )
end scope

ID( function fb_ErrorSetFuncName )
scope
dim chk as function fbcall ( byval as zstring ptr ) as zstring ptr
dim chk as function fbcall ( byval as const zstring ptr ) as zstring ptr
chk = procptr( fb_ErrorSetFuncName )
end scope

ID( sub fb_Assert )
scope
dim chk as sub fbcall ( byval as zstring ptr, byval as integer, byval as zstring ptr, byval as zstring ptr )
dim chk as sub fbcall ( byval as const zstring ptr, byval as const integer, byval as const zstring ptr, byval as const zstring ptr )
chk = procptr( fb_Assert )
end scope

ID( sub fb_Assert alias "fb_AssertW" )
scope
dim chk as sub fbcall ( byval as zstring ptr, byval as long, byval as zstring ptr, byval as wchar ptr )
dim chk as sub fbcall ( byval as const zstring ptr, byval as const long, byval as const zstring ptr, byval as const wchar ptr )
chk = procptr( fb_Assert )
end scope

ID( sub fb_AssertWarn )
scope
dim chk as sub fbcall ( byval as zstring ptr, byval as long, byval as zstring ptr, byval as zstring ptr )
dim chk as sub fbcall ( byval as const zstring ptr, byval as const long, byval as const zstring ptr, byval as const zstring ptr )
chk = procptr( fb_AssertWarn )
end scope

ID( sub fb_AssertWarn alias "fb_AssertWarnW" )
scope
dim chk as sub fbcall ( byval as zstring ptr, byval as long, byval as zstring ptr, byval as wchar ptr )
dim chk as sub fbcall ( byval as const zstring ptr, byval as const long, byval as const zstring ptr, byval as const wchar ptr )
chk = procptr( fb_AssertWarn )
end scope

Expand Down

0 comments on commit a8eface

Please sign in to comment.