Skip to content

remove use of Ref{Void} as a struct field type #43

@JeffBezanson

Description

@JeffBezanson

I believe we need more changes of the kind made in #40. For example _35_3_Providing_the_function_to_solve.jl still has a use of Ref{Void} in a struct. This is only correct if you want the struct to contain exactly a pointer to the object nothing. @vtjnash am I right about that?

Problems arise when storing a Ptr{Void} to such a field, because Ptr{Void} is no-op convertible to Ref{Void}, so the field ends up pointing to a boxed pointer. This strikes me as a bug in the type safety of Ref.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions