# nullable pointers follow const-casting rules · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/6edd81109d16178f1dc688dacee4b38964b617c4)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 6edd81109d16178f1dc688dacee4b38964b617c4

Requested commit: 6edd81109d16178f1dc688dacee4b38964b617c4

Commit: 6edd81109d16178f1dc688dacee4b38964b617c4

Tree: 7ca6c9b9b183846af311245176d40927076f9304

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
nullable pointers follow const-casting rules

any *T -> ?*T cast is allowed implicitly, even
when it occurs deep inside the type, and the cast
is a no-op at runtime.

in order to add this I had to make the comptime value
representation of nullable pointers the same as the
comptime value representation of normal pointers,
so that we don't have to do any recursive transformation
of values when doing this kind of cast.

```

## Parents

- [1a9d2f3aae780873eefedaf3fdf095b3cd87b55f](https://git.cafe/gitcafe/zig/commit/1a9d2f3aae780873eefedaf3fdf095b3cd87b55f?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/6edd81109d16178f1dc688dacee4b38964b617c4?format=markdown)
