c-capnproto and fieldgetset output for union fields

20 views
Skip to first unread message

michael...@gmail.com

unread,
Jul 17, 2019, 12:11:33 AM7/17/19
to Cap'n Proto
Hi,

I'm finding my way around the c-capnproto implementation (from the OpenSourceRouting Github repository), and while using its

$C.fieldgetset;
using C = import "/c.capnp";

accessors to write struct-members directly, was wondering whether it was yet able to do the same for union fields? It certainly understands how to write them as part of an enclosing type in the relevant write_MyType functions, but there doesn't appear to be the equivalent of a MyType_set_unionField.

I strongly suspect that it's either a misapprehension on my part, but any tips or background would be helpful.

Thanks,

Mike


Kenton Varda

unread,
Jul 17, 2019, 3:28:20 PM7/17/19
to michael...@gmail.com, Cap'n Proto
Hi Mike,

FWIW, I'm not sure if the authors of c-capnproto pay attention to this mailing list. You might have to contact them more directly. (Sorry, I've never used it myself.)

-Kenton

--
You received this message because you are subscribed to the Google Groups "Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+...@googlegroups.com.
Visit this group at https://groups.google.com/group/capnproto.
To view this discussion on the web visit https://groups.google.com/d/msgid/capnproto/497475f7-ece4-418d-9be0-c7826b445371%40googlegroups.com.

michael...@gmail.com

unread,
Jul 17, 2019, 5:24:52 PM7/17/19
to Cap'n Proto
Hi Kenton,

Thanks for taking the time to reply. I thought that might be the case, but the post is now out there in case someone comes along in the future. FWIW, I'm also having trouble getting the library's capn_init_fp function not to crash...

I might just have to bear the pain of making mine a mixed C/C++ project :-/

Cheers

Mike

On Wednesday, 17 July 2019 20:28:20 UTC+1, Kenton Varda wrote:
Hi Mike,

FWIW, I'm not sure if the authors of c-capnproto pay attention to this mailing list. You might have to contact them more directly. (Sorry, I've never used it myself.)

-Kenton

On Tue, Jul 16, 2019 at 9:11 PM <michae...@gmail.com> wrote:
Hi,

I'm finding my way around the c-capnproto implementation (from the OpenSourceRouting Github repository), and while using its

$C.fieldgetset;
using C = import "/c.capnp";

accessors to write struct-members directly, was wondering whether it was yet able to do the same for union fields? It certainly understands how to write them as part of an enclosing type in the relevant write_MyType functions, but there doesn't appear to be the equivalent of a MyType_set_unionField.

I strongly suspect that it's either a misapprehension on my part, but any tips or background would be helpful.

Thanks,

Mike


--
You received this message because you are subscribed to the Google Groups "Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capn...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages