Skip to content

Need iterators over unsafe buffers #2183

Closed
@brson

Description

@brson

In particular the case came up recently where somebody had an unsafe pointer to an array of null terminated character pointers, but didn't know how long it is. We should be able to write:

let buflen = unsafe { position(buf) {|i| i == ptr::null() } };

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions