-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
type_caster<absl::Cord>
: return Python str
when given `return_val…
…ue_policy::_clif_automatic`. Compared to other string-kind `type_caster`s in pybind11, `type_caster<absl::Cord>` is unusual in that it returns `bytes`. All other string-kind `type_caster`s return `str` and can be directed to use `bytes` instead via `return_value_policy::_return_as_bytes`. There is no `return_value_policy::return_as_str` that we could use here. Introducing such a policy just for `type_caster<absl::Cord>` seems heavy-handed. The existing `return_value_policy::_clif_automatic` fits this niche case organically and is fully sufficient for the purposes of PyCLIF-pybind11. PiperOrigin-RevId: 620916112
- Loading branch information
1 parent
0f8a997
commit 01171e9
Showing
4 changed files
with
37 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters