- /* Cast is fine here, because CHARSETS is never released. Note that
- the vec does not hold "const char *" pointers instead of "char *"
- because the non-phony version stores heap-allocated strings in
- it. */
- VEC_safe_push (char_ptr, charsets, (char *) GDB_DEFAULT_HOST_CHARSET);
- VEC_safe_push (char_ptr, charsets, NULL);
+ charsets.charsets.push_back (xstrdup (GDB_DEFAULT_HOST_CHARSET));
+ charsets.charsets.push_back (NULL);