http://d.puremagic.com/issues/show_bug.cgi?id=4796


Steven Schveighoffer <schvei...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schvei...@yahoo.com
          Component|Phobos                      |DMD


--- Comment #2 from Steven Schveighoffer <schvei...@yahoo.com> 2010-09-03 
08:13:42 PDT ---
Don is correct, I changed the interface of appender to be safer (not use
pointers to most likely stack variables).  Changing bug component to dmd, since
this is a dmd test issue, not a phobos issue.

Here is a patch.  I tried to test it but I get the ominous "no object.d error" 
I have no patience to try and understand what your test harnesses are doing, so
I'll let you figure out if this works or not:

Index: runnable/untag.d
===================================================================
--- runnable/untag.d    (revision 657)
+++ runnable/untag.d    (working copy)
@@ -101,9 +101,9 @@
                         "Could not find closing tag: "~txt);
             }
         } else {
-            string code;
-            findConsume(txt, ';', appender(&code));
-            switch (code) {
+            auto app = appender!string();
+            findConsume(txt, ';', app);
+            switch (app.data) {
             case "#160;": case "#32;": case "reg;": case "nbsp;":
                 writeChar(' ');
                 break;
@@ -120,7 +120,7 @@
                 writeChar('"');
                 break;
             default:
-                throw new Exception(text("Unknown code: &", code));
+                throw new Exception(text("Unknown code: &", app.data));
                 break;
             }
         }

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to