PSA: weird type changes in bus-related Banjo APIs

Skip to first unread message

P.Y. Laligand

Feb 3, 2021, 5:28:33 PM2/3/21
Hi there,

In I changed a few parameter types in some quite common Banjo APIs. For example, in fuchsia.hardware.platform.bus.PBus#CompositeDeviceAdd, the ddk.driver.DeviceFragment parameter became... a uint64. As a consequence, you'll see a few places where a reinterpret_cast<uint64_t> is used on a parameter in a Banjo method call. This will look weird, but it works!

The reason we are doing this is that the original types are blocking the deprecation of Banjo for a variety of reasons, and we are taking the path of least resistance to unblock this effort (see the comments in the CL above for an overview of the alternatives).

Please let me know if you have any questions.

Reply all
Reply to author
0 new messages