Eliminate make_cleanup_ui_file_delete / make ui_file a class hierarchy
[deliverable/binutils-gdb.git] / gdb / compile / compile.c
index 0ae212501fe9b7f5c022dbdf1506992a7f4eb9bb..b525f61eee880c1c7b68dcf57b4a03404581bfda 100644 (file)
@@ -494,22 +494,19 @@ compile_to_object (struct command_line *cmd, const char *cmd_string,
   /* From the provided expression, build a scope to pass to the
      compiler.  */
 
-  std::string input_buf;
+  string_file input_buf;
   const char *input;
 
   if (cmd != NULL)
     {
-      struct ui_file *stream = mem_fileopen ();
       struct command_line *iter;
 
-      make_cleanup_ui_file_delete (stream);
       for (iter = cmd->body_list[0]; iter; iter = iter->next)
        {
-         fputs_unfiltered (iter->line, stream);
-         fputs_unfiltered ("\n", stream);
+         input_buf.puts (iter->line);
+         input_buf.puts ("\n");
        }
 
-      input_buf = ui_file_as_string (stream);
       input = input_buf.c_str ();
     }
   else if (cmd_string != NULL)
This page took 0.025908 seconds and 4 git commands to generate.