Skip to content

Pointer notation & wrapper types #26

@shishioko

Description

@shishioko

The suggestion is to have a unsafe pointer wrapper class, instead of pointer variants of everything, with a notation as follows

p<u8> pointer = [address];
p<PacketMetadata> metaPointer = [address];

PacketMetadata meta = metaPointer[0]; // offsets defined in bytes, not in type sizes!

The reasoning is, that pointers addresses the working memory equally as an array is otherwise addressed.
This would also be way handier than casting integers to pointers manually first.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions