Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Issue 20534: Introduced a platform independent version of strchr, as the return value is c... (Closed)

Created:
11 years, 10 months ago by Søren Thygesen Gjesse
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Introduced a platform independent version of strchr, as the return value is const on Windows. This fixes building of D8 on Windows. Mac OS and FreeBSD changes have not been tested. Committed: http://code.google.com/p/v8/source/detail?r=1326

Patch Set 1 #

Total comments: 2

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -4 lines) Patch
M src/d8.cc View 1 2 chunks +4 lines, -4 lines 0 comments Download
M src/platform.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/platform-freebsd.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M src/platform-linux.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M src/platform-macos.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M src/platform-win32.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Søren Thygesen Gjesse
11 years, 10 months ago (2009-02-20 10:46:08 UTC) #1
Christian Plesner Hansen
Lgtm, with comment. http://codereview.chromium.org/20534/diff/1/7 File src/platform.h (right): http://codereview.chromium.org/20534/diff/1/7#newcode222 Line 222: static char* StrChr(const char* str, ...
11 years, 10 months ago (2009-02-20 11:20:09 UTC) #2
Søren Thygesen Gjesse
11 years, 10 months ago (2009-02-20 11:31:07 UTC) #3
http://codereview.chromium.org/20534/diff/1/7
File src/platform.h (right):

http://codereview.chromium.org/20534/diff/1/7#newcode222
Line 222: static char* StrChr(const char* str, int c);
Good point removed const from the argument.

On 2009/02/20 11:20:09, Christian Plesner Hansen wrote:
> Consider making the argument non-const.  I've been bitten by passing a string
> that shouldn't be modified into strchr and then modifying the result -- the
> error on windows was what alerted me to it.

Powered by Google App Engine
This is Rietveld 408576698