Browse Source

+ Enable resourcestring in all modes
* Pre-initialize resourcestrings

git-svn-id: trunk@5637 -

daniel 18 years ago
parent
commit
1b173fd0f3
3 changed files with 5 additions and 5 deletions
  1. 1 1
      compiler/cresstr.pas
  2. 3 3
      compiler/psub.pas
  3. 1 1
      compiler/tokens.pas

+ 1 - 1
compiler/cresstr.pas

@@ -203,7 +203,7 @@ uses
             resstrlab:=current_asmdata.DefineAsmSymbol(make_mangledname('RESSTR',R.Sym.owner,R.Sym.name),AB_GLOBAL,AT_DATA);
             current_asmdata.asmlists[al_resourcestrings].concat(tai_symbol.Create_global(resstrlab,0));
             current_asmdata.asmlists[al_resourcestrings].concat(tai_const.create_sym(namelab));
-            current_asmdata.asmlists[al_resourcestrings].concat(tai_const.create_sym(nil));
+            current_asmdata.asmlists[al_resourcestrings].concat(tai_const.create_sym(valuelab));
             current_asmdata.asmlists[al_resourcestrings].concat(tai_const.create_sym(valuelab));
             current_asmdata.asmlists[al_resourcestrings].concat(tai_const.create_32bit(longint(R.Hash)));
 {$ifdef cpu64bit}

+ 3 - 3
compiler/psub.pas

@@ -1607,10 +1607,10 @@ implementation
                       begin
                         { m_class is needed, because the resourcestring
                           loading is in the ObjPas unit }
-                        if (m_class in current_settings.modeswitches) then
+{                        if (m_class in current_settings.modeswitches) then}
                           resourcestring_dec
-                        else
-                          break;
+{                        else
+                          break;}
                       end;
                     _PROPERTY:
                       begin

+ 1 - 1
compiler/tokens.pas

@@ -496,7 +496,7 @@ const
       (str:'UNIMPLEMENTED' ;special:false;keyword:m_all;op:NOTOKEN),
       (str:'IMPLEMENTATION';special:false;keyword:m_all;op:NOTOKEN),
       (str:'INITIALIZATION';special:false;keyword:m_initfinal;op:NOTOKEN),
-      (str:'RESOURCESTRING';special:false;keyword:m_class;op:NOTOKEN)
+      (str:'RESOURCESTRING';special:false;keyword:m_all;op:NOTOKEN)
   );