mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 17:29:11 +02:00
+ public is the same as export for c_vars
* a exported/public c_var incs now the refcount
This commit is contained in:
parent
e35ce06a21
commit
2f9143310e
@ -73,8 +73,8 @@ unit pdecl;
|
|||||||
|
|
||||||
function read_type(const name : stringid) : pdef;forward;
|
function read_type(const name : stringid) : pdef;forward;
|
||||||
|
|
||||||
procedure const_dec;
|
|
||||||
|
|
||||||
|
procedure const_dec;
|
||||||
var
|
var
|
||||||
name : stringid;
|
name : stringid;
|
||||||
p : ptree;
|
p : ptree;
|
||||||
@ -82,8 +82,9 @@ unit pdecl;
|
|||||||
sym : psym;
|
sym : psym;
|
||||||
ps : pconstset;
|
ps : pconstset;
|
||||||
pd : pbestreal;
|
pd : pbestreal;
|
||||||
|
{$ifdef USEANSISTRING}
|
||||||
sp : pstring;
|
sp : pstring;
|
||||||
|
{$endif USEANSISTRING}
|
||||||
begin
|
begin
|
||||||
consume(_CONST);
|
consume(_CONST);
|
||||||
repeat
|
repeat
|
||||||
@ -310,6 +311,7 @@ unit pdecl;
|
|||||||
not(is_record or is_object) and
|
not(is_record or is_object) and
|
||||||
((pattern='EXPORT') or
|
((pattern='EXPORT') or
|
||||||
(pattern='EXTERNAL') or
|
(pattern='EXTERNAL') or
|
||||||
|
(pattern='PUBLIC') or
|
||||||
(pattern='CDECL')) then
|
(pattern='CDECL')) then
|
||||||
begin
|
begin
|
||||||
{ only allowed for one var }
|
{ only allowed for one var }
|
||||||
@ -335,7 +337,7 @@ unit pdecl;
|
|||||||
extern_csym:=true;
|
extern_csym:=true;
|
||||||
end;
|
end;
|
||||||
{ export }
|
{ export }
|
||||||
if pattern='EXPORT' then
|
if (pattern='EXPORT') or (pattern='PUBLIC') then
|
||||||
begin
|
begin
|
||||||
consume(ID);
|
consume(ID);
|
||||||
if extern_csym then
|
if extern_csym then
|
||||||
@ -362,6 +364,8 @@ unit pdecl;
|
|||||||
consume(SEMICOLON);
|
consume(SEMICOLON);
|
||||||
{ insert in the symtable }
|
{ insert in the symtable }
|
||||||
Csym:=new(pvarsym,init_C(s,C_name,p));
|
Csym:=new(pvarsym,init_C(s,C_name,p));
|
||||||
|
if export_Csym then
|
||||||
|
inc(Csym^.refs);
|
||||||
if extern_Csym then
|
if extern_Csym then
|
||||||
begin
|
begin
|
||||||
Csym^.var_options:=Csym^.var_options or vo_is_external;
|
Csym^.var_options:=Csym^.var_options or vo_is_external;
|
||||||
@ -1881,7 +1885,11 @@ unit pdecl;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.37 1998-08-11 15:31:38 peter
|
Revision 1.38 1998-08-12 19:20:39 peter
|
||||||
|
+ public is the same as export for c_vars
|
||||||
|
* a exported/public c_var incs now the refcount
|
||||||
|
|
||||||
|
Revision 1.37 1998/08/11 15:31:38 peter
|
||||||
* write extended to ppu file
|
* write extended to ppu file
|
||||||
* new version 0.99.7
|
* new version 0.99.7
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user