URL:
  <http://gna.org/bugs/?22962>

                 Summary: Nested macros result in incorrect textdomain
assignments
                 Project: Battle for Wesnoth
            Submitted by: shadowmaster
            Submitted on: Mon 17 Nov 2014 05:49:17 AM CLST
                Category: Bug
                Severity: 5 - Blocker
                Priority: 5 - Normal
              Item Group: WML
                  Status: In Progress
                 Privacy: Public
             Assigned to: shadowmaster
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.10.x, 1.12.0
        Operating System: Maybe any

    _______________________________________________________

Details:

Taking the following code as example:


#textdomain YYYYYYYY

#define A ARG1
        a={ARG1}
#enddef

#define B CODE
        {CODE}
#enddef

#textdomain ZZZZZZZZ

#{B ( # start B

{A _"AAAAAAAA!!!!!!!!"}

foo= _ "bar"

#)} #end B



On line 17, `_ "bar"` is assigned the ZZZZZZZZ textdomain as expected.
However, if one uncomments lines 13 and 19 (making the context part of the
substitution of the B macro), the string gets assigned the wesnoth textdomain
instead of ZZZZZZZZ or even YYYYYYYY, presumably because it's a default value
used somewhere down the pipeline.

Furthermore, if one uncomments lines 13 and 19 and comments out line 15 (the A
macro inclusion), `_ "bar"` gets ZZZZZZZZ again. This suggests a problem with
the restoring of the preprocessor context following the substitution of a
nested macro or macro argument.

(This is a reduced test case for an issue brought up in this forum thread
<http://forums.wesnoth.org/viewtopic.php?f=4&t=41129>.)




    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?22962>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to