Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SF: SB: Mutable pointer arguments #28

Open
iondev33 opened this issue Dec 21, 2023 · 0 comments
Open

SF: SB: Mutable pointer arguments #28

iondev33 opened this issue Dec 21, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request Source Forge - feature feature request migrated from Source Source
Milestone

Comments

@iondev33
Copy link
Collaborator

In C++ code that uses ION, eids may be stored in c++ std::string objects. std::string is converted to a char pointer via the .c_str() method, which returns a const pointer. So, to safely pass these EID's into ION API functions that expect non-const arguments (e.g., bp_send's destEID parameter), it is necessary to make a mutable copy first. We should scrub the ION public API function prototypes of unnecessarily mutable pointer arguments.

@iondev33 iondev33 added enhancement New feature or request Source Forge - feature feature request migrated from Source Source labels Dec 21, 2023
@iondev33 iondev33 added this to the ION 4.1.4 milestone Dec 21, 2023
@iondev33 iondev33 self-assigned this Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Source Forge - feature feature request migrated from Source Source
Projects
None yet
Development

No branches or pull requests

1 participant