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

Issue 1117413002: Save 4 bytes per CFX_ByteString where size_t smaller than long. (Closed)

Created:
5 years, 7 months ago by Tom Sepez
Modified:
5 years, 7 months ago
Reviewers:
Lei Zhang
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Save 4 bytes per CFX_ByteString where intptr_t smaller than long. Also prevent theoretical roll-over where long smaller than intptr_t. See bug for discussion. BUG=pdfium:149 R=thestig@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/34989e42d94f0b4f982117032f29ae3cce1e1a39

Patch Set 1 #

Patch Set 2 : Comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -10 lines) Patch
M core/include/fxcrt/fx_string.h View 1 3 chunks +10 lines, -10 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
Tom Sepez
Lei, for review. Even better.
5 years, 7 months ago (2015-05-01 22:28:19 UTC) #2
Lei Zhang
lgtm Did you mean to say intptr_t instead of size_t?
5 years, 7 months ago (2015-05-01 22:53:47 UTC) #3
Tom Sepez
Committed patchset #2 (id:20001) manually as 34989e42d94f0b4f982117032f29ae3cce1e1a39 (presubmit successful).
5 years, 7 months ago (2015-05-01 23:04:35 UTC) #4
dreamfly912
On 2015/05/01 22:28:19, Tom Sepez wrote: > Lei, for review. Even better. Hi Tom, why ...
5 years, 7 months ago (2015-05-08 03:55:36 UTC) #5
dreamfly912
On 2015/05/08 03:55:36, dreamfly912 wrote: > On 2015/05/01 22:28:19, Tom Sepez wrote: > > Lei, ...
5 years, 7 months ago (2015-05-08 03:59:47 UTC) #6
Tom Sepez
5 years, 7 months ago (2015-05-08 17:04:23 UTC) #7
Message was sent while issue was closed.
On 2015/05/08 03:59:47, dreamfly912 wrote:
> On 2015/05/08 03:55:36, dreamfly912 wrote:
> > On 2015/05/01 22:28:19, Tom Sepez wrote:
> > > Lei, for review.  Even better.
> > 
> > Hi Tom, why intptr_t is smaller than long?
> 
> afaik, on 32bit platform, both intptr_t and long are 32bit; on 64bit
Linux(LP64)
> platform, both intptr_t and long are 64bit; on 64bit Windows(LP64) platform,
> intptr_t is 64bit and long is 32bit;
> Thanks :)

Nothing in the standards say that it has to be that way.  What you're talking
about are implementation details of current platforms, which may happily work
out or may not.

Powered by Google App Engine
This is Rietveld 408576698