Branch: Tag:

2013-02-07

2013-02-07 13:08:01 by Henrik Grubbström (Grubba) <grubba@grubba.org>

String: Made the status() function reachable.

Adds String.status(), which is a direct interface to add_string_status().

add_string_status() now uses string_builder instead of dynamic_buffer.

It also now knows about short and wide strings.

Changes the output formatting of add_string_status(), but this
should not matter, since it was not used anywhere.

988:    RETURN string_slice (s, start, end + 1 - start);   }    + /*! @decl status(int verbose) +  *! @belongs String +  *! +  *! Get string table statistics. +  *! +  *! @returns +  *! Returns a string with an ASCII table containing +  *! the current string table statistics. +  *! +  *! @note +  *! Currently returns the empty string (@expr{""@}) +  *! if @[verbose] is zero. +  *! +  *! @note +  *! The formatting and contents of the result +  *! may vary between different versions of Pike. +  */ + PIKEFUN string string_status(int verbose) +  errname String.status; + { +  RETURN add_string_status(verbose); + } +    /*! @decl int implements(program prog, program api)    *! @belongs Program    *!