You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/05/12 13:36:00 UTC
[jira] [Updated] (ARROW-12530) [C++] Remove Buffer::mutable_data_
member and use const_cast on data_ only if is_mutable_ is true
[ https://issues.apache.org/jira/browse/ARROW-12530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated ARROW-12530:
-----------------------------------
Labels: pull-request-available (was: )
> [C++] Remove Buffer::mutable_data_ member and use const_cast on data_ only if is_mutable_ is true
> -------------------------------------------------------------------------------------------------
>
> Key: ARROW-12530
> URL: https://issues.apache.org/jira/browse/ARROW-12530
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++
> Reporter: Wes McKinney
> Assignee: Antoine Pitrou
> Priority: Major
> Labels: pull-request-available
> Fix For: 5.0.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Proposed new implementation of mutable_data() by [~apitrou]
> {code}
> uint8_t* mutable_data() {
> return is_mutable() ? const_cast<uint8_t*>(data()) : nullptr;
> }
> {code}
> This will help avoid various classes of bugs (initializing Buffer subclasses incorrectly) and make the object smaller on the heap
--
This message was sent by Atlassian Jira
(v8.3.4#803005)