2016-11-08 Pedro Alves <palves@redhat.com>
+ * c-exp.y (OPERATOR NEW): Adjust to use ui_file_as_string and
+ std::string.
+
+2016-11-08 Pedro Alves <palves@redhat.com>
+
* c-lang.h (c_compute_program): Now returns std::string.
* compile/compile-internal.h (class compile_file_names): New
class.
| OPERATOR OBJC_LBRAC ']'
{ $$ = operator_stoken ("[]"); }
| OPERATOR conversion_type_id
- { char *name;
- long length;
- struct ui_file *buf = mem_fileopen ();
+ { struct ui_file *buf = mem_fileopen ();
c_print_type ($2, NULL, buf, -1, 0,
&type_print_raw_options);
- name = ui_file_xstrdup (buf, &length);
+ std::string name = ui_file_as_string (buf);
ui_file_delete (buf);
- $$ = operator_stoken (name);
- free (name);
+ $$ = operator_stoken (name.c_str ());
}
;