# Vtable interfaces and the role of @ptrCast and @alignCast

**URL:** <https://ziggit.dev/t/vtable-interfaces-and-the-role-of-ptrcast-and-aligncast/2062>\
**Category:** Help\
**Tags:** language\
**Created:** [October 28, 2023, 9:01am UTC](https://ziggit.dev/t/vtable-interfaces-and-the-role-of-ptrcast-and-aligncast/2062 "2023-10-28T09:01:30Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![efjimm](https://ziggit.dev/user_avatar/ziggit.dev/efjimm/32/5221_2.png) [@efjimm](https://ziggit.dev/u/efjimm)\
**Post date:** [February 2, 2024, 10:18pm UTC](https://ziggit.dev/t/vtable-interfaces-and-the-role-of-ptrcast-and-aligncast/2062/11 "2024-02-02T22:18:42Z")

</div>

Instead of wrapping every function in the vtable you can just cast the function pointer so long as the signature matches e.g. `*const fn (*T) ?u32` can cast into `*const fn (*anyopaque) ?u32`

---

_[View the full topic](https://ziggit.dev/t/vtable-interfaces-and-the-role-of-ptrcast-and-aligncast/2062)._
