Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(6797)

Issue 579310043: Don't count terminating \0 in Source_file::length (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years, 2 months ago by hanwenn
Modified:
4 years, 2 months ago
Reviewers:
Dan Eble, dak
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Don't count terminating \0 in Source_file::length This can confuse the SCM parser, because GUILE can interpret a \0 as part of an identifer.

Patch Set 1 #

Total comments: 4

Patch Set 2 : std:string #

Total comments: 2

Patch Set 3 : remove vector<char> #

Total comments: 8

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -38 lines) Patch
M lily/include/font-metric.hh View 1 2 1 chunk +1 line, -1 line 0 comments Download
M lily/include/source-file.hh View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
M lily/lily-guile.cc View 1 2 2 chunks +1 line, -3 lines 0 comments Download
M lily/pfb.cc View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M lily/pfb-scheme.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M lily/source-file.cc View 1 2 3 5 chunks +20 lines, -26 lines 0 comments Download

Messages

Total messages: 12
Dan Eble
https://codereview.appspot.com/579310043/diff/549550043/lily/include/source-file.hh File lily/include/source-file.hh (right): https://codereview.appspot.com/579310043/diff/549550043/lily/include/source-file.hh#newcode44 lily/include/source-file.hh:44: /* The input data, plus an extra \0 to ...
4 years, 2 months ago (2020-02-14 12:43:40 UTC) #1
dak
https://codereview.appspot.com/579310043/diff/549550043/lily/source-file.cc File lily/source-file.cc (right): https://codereview.appspot.com/579310043/diff/549550043/lily/source-file.cc#newcode51 lily/source-file.cc:51: characters_.push_back ((char)c); Frankly, this seems like C++ should offer ...
4 years, 2 months ago (2020-02-14 13:00:33 UTC) #2
hanwenn
https://codereview.appspot.com/579310043/diff/549550043/lily/include/source-file.hh File lily/include/source-file.hh (right): https://codereview.appspot.com/579310043/diff/549550043/lily/include/source-file.hh#newcode44 lily/include/source-file.hh:44: /* The input data, plus an extra \0 to ...
4 years, 2 months ago (2020-02-14 22:12:28 UTC) #3
hanwenn
std:string
4 years, 2 months ago (2020-02-14 22:13:46 UTC) #4
dak
https://codereview.appspot.com/579310043/diff/561450043/lily/source-file.cc File lily/source-file.cc (right): https://codereview.appspot.com/579310043/diff/561450043/lily/source-file.cc#newcode137 lily/source-file.cc:137: data_ = string (&chars[0], chars.size ()); gulp_file_to_string ? That ...
4 years, 2 months ago (2020-02-14 22:40:52 UTC) #5
hanwenn
https://codereview.appspot.com/579310043/diff/561450043/lily/source-file.cc File lily/source-file.cc (right): https://codereview.appspot.com/579310043/diff/561450043/lily/source-file.cc#newcode137 lily/source-file.cc:137: data_ = string (&chars[0], chars.size ()); On 2020/02/14 22:40:51, ...
4 years, 2 months ago (2020-02-14 22:43:36 UTC) #6
hanwenn
remove vector<char>
4 years, 2 months ago (2020-02-14 23:13:48 UTC) #7
Dan Eble
LGTM. Changing to std::string is a definite improvement. Thanks. https://codereview.appspot.com/579310043/diff/557420043/lily/engraver.cc File lily/engraver.cc (right): https://codereview.appspot.com/579310043/diff/557420043/lily/engraver.cc#newcode121 lily/engraver.cc:121: ...
4 years, 2 months ago (2020-02-15 13:53:17 UTC) #8
hanwenn
rebase
4 years, 2 months ago (2020-02-15 17:06:34 UTC) #9
hanwenn
https://codereview.appspot.com/579310043/diff/557420043/lily/engraver.cc File lily/engraver.cc (right): https://codereview.appspot.com/579310043/diff/557420043/lily/engraver.cc#newcode121 lily/engraver.cc:121: if (!scm_is_pair (props)) { On 2020/02/15 13:53:16, Dan Eble ...
4 years, 2 months ago (2020-02-15 17:07:00 UTC) #10
hanwenn
https://codereview.appspot.com/579310043/diff/557420043/lily/source-file.cc File lily/source-file.cc (right): https://codereview.appspot.com/579310043/diff/557420043/lily/source-file.cc#newcode55 lily/source-file.cc:55: return contents of FILENAME. *Not 0-terminated!* On 2020/02/15 13:53:17, ...
4 years, 2 months ago (2020-02-15 17:07:22 UTC) #11
hanwenn
4 years, 2 months ago (2020-02-19 09:36:04 UTC) #12
commit 73a39333690293208b969d1d8d656f5837467e1c
Author: Han-Wen Nienhuys <hanwen@lilypond.org>
Date:   Thu Feb 13 09:13:02 2020 +0100

    Store Source_file data in std::string
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b