Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

buf.fill(null) behavior #8469

Closed
Closed
@tonistiigi

Description

@tonistiigi

I had some old code that used buf.fill(null) for clearing up buffer contents. Looking at the docs I don't see it mentioned anywhere so I'm not sure if this is something I just came up or picked up from some sample code.

Anyway this used to work in v0.8 and v0.10 but doesn't work in v0.11. I bisected it to this change 4b40358 and because the commit message only mentions strings, I think the null behavior change may be unintentional.

So its something that is not documented/supported but has a potential to break old code.

Do you think this is worth to change the behavior to match old versions. Or should the function return an error for such input?

I could probably provide a PR.

/cc @trevnorris

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions