pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:3043:    continue;       case 'T': /* struct pike_type */    /* FIXME: Doesn't care about field or integer widths yet. */    low_describe_type(s, va_arg(args, struct pike_type *));    break;       case 'O':    {    /* FIXME: Doesn't care about field or integer widths yet. */ -  dynamic_buffer old_buf; -  init_buf(&old_buf); -  describe_svalue(va_arg(args, struct svalue *), 0, NULL); -  string_builder_binary_strcat(s, buffer_ptr(&pike_global_buffer), -  buffer_content_length(&pike_global_buffer)); -  toss_buffer(&pike_global_buffer); -  restore_buffer(&old_buf); +  struct byte_buffer buf = BUFFER_INIT(); +  describe_svalue(&buf, va_arg(args, struct svalue *), 0, NULL); +  string_builder_binary_strcat(s, buffer_ptr(&buf), buffer_content_length(&buf)); +  buffer_free(&buf);    }    break;    case 'S':    /* Note: On some platforms this is an alias for %ls, so if you    * want to output wchar_t strings, use %ls instead!    */    {    struct pike_string *str = va_arg(args, struct pike_string *);    size_t len = str->len;    if (precision && (precision < len)) len = precision;