New issue
Advanced search Search tips

Issue 738066 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

file.h API to use void*/const void* for data instead of char*/const char*

Project Member Reported by ricardoq@chromium.org, Jun 29 2017

Issue description

Chrome Version: 59.0.3071.109
OS: Linux

What steps will reproduce the problem?
(1) file.h API accepts `char*` and  `const char*` for data. Instead it should accept `void*` and `const void*`

What is the expected result?
By accepting `void*`, it is easier to use since:
  - semantics are more clear: it accepts an opaque buffer
  - users don't need to `reinterpret_cast<>` in order to use it 
  - real example: if you have an `std::vector<uint8_t>` you have to `reinterprect_cast<>()` before calling `WriteAtCurrentPos()`


What happens instead?
  - it only accepts `char*` as destination buffer, and `const char*` as source buffer.

 
I'll happily send the patch if you think it is worth having the proposed change
Cc: dcheng@chromium.org
Components: Platform>Apps>ARC

Sign in to add a comment