mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-25 00:29:25 +02:00
parent
7d9314d5e8
commit
475664acf5
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -7968,6 +7968,7 @@ tests/webtbs/tw7173.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw7195.pp svneol=native#text/plain
|
tests/webtbs/tw7195.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw7200.pp svneol=native#text/plain
|
tests/webtbs/tw7200.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw7227.pp svneol=native#text/plain
|
tests/webtbs/tw7227.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw7242.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw7276.pp svneol=native#text/plain
|
tests/webtbs/tw7276.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw7281.pp svneol=native#text/plain
|
tests/webtbs/tw7281.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw7285.pp svneol=native#text/plain
|
tests/webtbs/tw7285.pp svneol=native#text/plain
|
||||||
|
@ -2586,7 +2586,7 @@ const
|
|||||||
fwpd.procoptions:=fwpd.procoptions+currpd.procoptions;
|
fwpd.procoptions:=fwpd.procoptions+currpd.procoptions;
|
||||||
|
|
||||||
{ marked as local but exported from unit? }
|
{ marked as local but exported from unit? }
|
||||||
if (fwpd.procoptions*[po_global,po_kylixlocal])=[po_global,po_kylixlocal] then
|
if (po_kylixlocal in fwpd.procoptions) and (fwpd.owner.symtabletype=globalsymtable) then
|
||||||
MessagePos(fwpd.fileinfo,type_e_cant_export_local);
|
MessagePos(fwpd.fileinfo,type_e_cant_export_local);
|
||||||
|
|
||||||
if fwpd.extnumber=$ffff then
|
if fwpd.extnumber=$ffff then
|
||||||
|
67
tests/webtbs/tw7242.pp
Normal file
67
tests/webtbs/tw7242.pp
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
unit TestLibMain;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
function _tl_get_str( input: PChar ): PChar; CDecl;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, SysUtils;
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
// forward declarations of internal routines
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
function __GetStr( const input: string; var error: integer ): string; local; forward;
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
function _tl_get_str( input: PChar ): PChar; CDecl;
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// Called by : -
|
||||||
|
// Purpose : -
|
||||||
|
// Arguments : -
|
||||||
|
// Returns : -
|
||||||
|
// ToDo : -
|
||||||
|
// Remarks : -
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
var
|
||||||
|
retval: string;
|
||||||
|
error : integer;
|
||||||
|
begin
|
||||||
|
result := nil;
|
||||||
|
error := 0;
|
||||||
|
|
||||||
|
retval := __GetStr( input, error );
|
||||||
|
if (error = 0) and (retval <> '') then try
|
||||||
|
GetMem( result, Length( retval ) + 1 );
|
||||||
|
StrPCopy( result, retval );
|
||||||
|
except
|
||||||
|
error := 1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
// INTERNAL ROUTINES ( without usage of PChar to avoid memory leaks! )
|
||||||
|
//=============================================================================
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
function __GetStr( const input: string; var error: integer ): string; local;
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// Called by : -
|
||||||
|
// Purpose : -
|
||||||
|
// Arguments : -
|
||||||
|
// Returns : -
|
||||||
|
// ToDo : -
|
||||||
|
// Remarks : -
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
begin
|
||||||
|
error := 0;
|
||||||
|
result := input;
|
||||||
|
end;
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
//= END OF FILE ===============================================================
|
||||||
|
|
Loading…
Reference in New Issue
Block a user