Skip to content

CString behaves strangely with regard to *const and *mut #16772

@wycats

Description

@wycats

In the current API, CString::new takes a *const i8, but it has a method as_mut_ptr which returns a *mut i8.

The as_mut_ptr method seems to violate the invariant that the new method is trying to impose.

Perhaps we need CString and MutCString, as well as MutCString::to_c_string?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions