Explorar o código

* fixed static variables

peter %!s(int64=24) %!d(string=hai) anos
pai
achega
4df5f03ca7
Modificáronse 2 ficheiros con 9 adicións e 5 borrados
  1. 5 2
      compiler/pdecvar.pas
  2. 4 3
      compiler/pexpr.pas

+ 5 - 2
compiler/pdecvar.pas

@@ -83,7 +83,7 @@ implementation
                 if (st^.symtabletype=objectsymtable) and
                    (sp_static in current_object_option) then
                   begin
-                     s:=lower(st^.name^)+'_'+s;
+                     s:='$'+lower(st^.name^)+'_'+upper(s);
                      st^.defowner^.owner^.insert(new(pvarsym,init(s,tt)));
                   end;
              end;
@@ -515,7 +515,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.4  2000-11-29 00:30:36  florian
+  Revision 1.5  2000-12-17 14:00:18  peter
+    * fixed static variables
+
+  Revision 1.4  2000/11/29 00:30:36  florian
     * unused units removed from uses clause
     * some changes for widestrings
 

+ 4 - 3
compiler/pexpr.pas

@@ -978,8 +978,6 @@ implementation
                         Message(parser_e_only_class_methods_via_class_ref);
                       if (sp_static in sym^.symoptions) then
                         begin
-                           { static_name:=lower(srsymtable^.name^)+'_'+sym^.name;
-                             this is wrong for static field in with symtable (PM) }
                            static_name:=lower(srsym^.owner^.name^)+'_'+sym^.name;
                            getsym(static_name,true);
                            p1.destroy;
@@ -2420,7 +2418,10 @@ _LECKKLAMMER : begin
 end.
 {
   $Log$
-  Revision 1.21  2000-12-15 13:26:01  jonas
+  Revision 1.22  2000-12-17 14:00:18  peter
+    * fixed static variables
+
+  Revision 1.21  2000/12/15 13:26:01  jonas
     * only return int64's from functions if it int64funcresok is defined
     + added int64funcresok define to options.pas