You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Antoine Pitrou (Jira)" <ji...@apache.org> on 2021/05/12 13:25:00 UTC
[jira] [Assigned] (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 ]
Antoine Pitrou reassigned ARROW-12530:
--------------------------------------
Assignee: Antoine Pitrou
> [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
> Fix For: 5.0.0
>
>
> 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)