PointerToolkit

Provides structs that wrap pointers, and Unsafe methods for converting to and from `ref` pointers of any type.

MIT License

Stars
17
Committers
1

Bot releases are hidden (Show)

PointerToolkit - v1.0.1 Latest Release

Published by rickbrew 10 months ago

This isn't a big update, it just adds the implicit cast operators from T* to CastPtr<T, ...> that weren't always being generated.

PointerToolkit - v1.0.0

Published by rickbrew almost 2 years ago

This release removes the preview designation, making this the first stable release.

PointerToolkit - v1.0.0-preview8

Published by rickbrew almost 2 years ago

This releases increases the number of generated CastPtr<T, TBase1, ..., TBaseN> structs from 12 to 16. The latest version of TerraFX.Interop.Windows adds support for some new COM interfaces, and so the new version of PointerToolkit.TerraFX.Interop.Windows now requires support for 13 base interfaces.

PointerToolkit - v1.0.0-preview7

Published by rickbrew over 2 years ago

This release fleshes out the Ptr structs by marking them as readonly and adding all of the comparison operators (>, >=, <, <=), arithmetic operators (+, -), and casting operators that you would expect/need for pointers. Indexers are also now provided. There's now a Value property on each struct, which permits you to pass a pointer into an iterator or into async code and use it (using Get() wouldn't work since it returns a pointer). ToString() methods are provided which default to hex notation (e.g. 0x123456789ABCDEF), and IFormattable is also implemented.

PointerToolkit - v1.0.0-preview6

Published by rickbrew almost 3 years ago

This release adds UnsafePtr.AddByteOffset() and SubtractByteOffset(), and reworks UnsafePtr.AsPointer() to return pointers, not ref pointers. The latter returns a pointer with the same level of indirection as the input parameter, so ref T -> T* (same as Unsafe.AsPointer() but strongly-typed), ref T* -> T**, and ref T** -> T***.

PointerToolkit - v1.0.0-preview5

Published by rickbrew almost 3 years ago

This release adds the PtrOperators class, meant to be used in conjunction with a global using static PointerToolkit.PtrOperators; statment. See the README.md for an example of where this is useful.

PointerToolkit - v1.0.0-preview4

Published by rickbrew almost 3 years ago

This release adds a Get() method to all of the Ptr types, and fixes the PtrPtrPtr types to have *** instead of ** (copypasta error).

PointerToolkit - v1.0.0-preview3

Published by rickbrew almost 3 years ago