]> sourceware.org Git - systemtap.git/commit - parse.cxx
kill interned_string::c_str(), allowing shared substr()
authorJosh Stone <jistone@redhat.com>
Thu, 12 Nov 2015 22:14:22 +0000 (14:14 -0800)
committerJosh Stone <jistone@redhat.com>
Thu, 12 Nov 2015 22:14:22 +0000 (14:14 -0800)
commit7371cd19d53f959d23a50fed28eab5a5f7fc7322
tree6409163a4a80284004e23922f34fb3a9d13bf014
parentcf91ec23bf4fdd4de2718133905c532fb9c40f60
kill interned_string::c_str(), allowing shared substr()

For the most part, c_str() is just used for "%s" in warnings, errors,
and debug messages.  We can afford to pay the cost of to_string() there,
while allowing string_ref to share memory the rest of the time.

NB: when using `to_string().c_str()`, it's important not to let that
pointer outlive the string temporary!  It's good only for the range of
its full expression; if you need it longer, bind the string to a local
reference first.
dwflpp.cxx
elaborate.cxx
parse.cxx
session.cxx
staptree.cxx
stringtable.h
tapset-mark.cxx
tapset-perfmon.cxx
tapsets.cxx
translate.cxx
This page took 0.029576 seconds and 5 git commands to generate.