Browse Source

* Use IncRefCountBy

git-svn-id: trunk@6142 -
pierre 18 years ago
parent
commit
f82d47e370
1 changed files with 3 additions and 3 deletions
  1. 3 3
      compiler/nld.pas

+ 3 - 3
compiler/nld.pas

@@ -258,7 +258,7 @@ implementation
              end;
              end;
            staticvarsym :
            staticvarsym :
              begin
              begin
-               inc(tabstractvarsym(symtableentry).refs);
+               tabstractvarsym(symtableentry).IncRefCountBy(1);
                { static variables referenced in procedures or from finalization,
                { static variables referenced in procedures or from finalization,
                  variable needs to be in memory.
                  variable needs to be in memory.
                  It is too hard and the benefit is too small to detect whether a
                  It is too hard and the benefit is too small to detect whether a
@@ -275,7 +275,7 @@ implementation
            paravarsym,
            paravarsym,
            localvarsym :
            localvarsym :
              begin
              begin
-               inc(tabstractvarsym(symtableentry).refs);
+               tabstractvarsym(symtableentry).IncRefCountBy(1);
                { Nested variable? The we need to load the framepointer of
                { Nested variable? The we need to load the framepointer of
                  the parent procedure }
                  the parent procedure }
                if assigned(current_procinfo) and
                if assigned(current_procinfo) and
@@ -393,7 +393,7 @@ implementation
                   Tabstractvarsym(symtableentry).trigger_notifications(vn_onread);
                   Tabstractvarsym(symtableentry).trigger_notifications(vn_onread);
                 { count variable references }
                 { count variable references }
                 if cg.t_times>1 then
                 if cg.t_times>1 then
-                  inc(tabstractvarsym(symtableentry).refs,cg.t_times-1);
+                  tabstractvarsym(symtableentry).IncRefCountBy(cg.t_times-1);
               end;
               end;
             procsym :
             procsym :
                 begin
                 begin