mirror of
https://github.com/zap-proto/ocaml.git
synced 2026-10-30 15:04:23 +00:00
Before, the only ways to create a struct were as a root, or as a child with a type declared in the schema. For AnyPointer types, we need to be able to add any struct to a message. This commit adds two new auto-generated operations to structs: - `Child.init_pointer ptr` allocates a fresh `Child` struct, storing a pointer to it in `ptr`, and returns its builder. - `Child.of_pointer ptr` returns a reader for the `Child` struct pointed to by `ptr`. Also, it is sometimes necessary to set an AnyPointer to an interface rather than to a struct. For this, there are two new generated operations on pointers: `field_set_interface` and `field_get_interface`.
6 lines
48 B
Plaintext
6 lines
48 B
Plaintext
S src/**
|
|
B _build/src
|
|
PKG uint
|
|
PKG core
|
|
PKG res
|