]> granicus.if.org Git - graphviz/commit
exstringOf: avoid sfprintf in float-to-string
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 24 Jul 2021 02:31:46 +0000 (19:31 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 4 Aug 2021 01:47:09 +0000 (18:47 -0700)
commit7ed49400d9b0c8791691c692c8b7e6f34d923f4e
tree62455b4e6b0d5355d0d187753ed4f4b0dbd5650a
parentf11e2b51f4bb09a3e5059aea93f3a253e808cc88
exstringOf: avoid sfprintf in float-to-string

Instead of constructing a string in the `tmp` buffer and then eventually
allocating vmalloc space to copy this into, we can simply compute the number of
bytes in advance, allocate vmalloc space, and then directly emit the output into
the vmalloc buffer. Related to #1873, #1998.
lib/expr/exgram.h