|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3-RESEND 03/28] libxl: ocaml: avoid reserved words in type and field names.
> On Thu, 2013-10-31 at 14:27 +0000, Ian Jackson wrote:
> > Ian Campbell writes ("Re: [PATCH v3-RESEND 03/28] libxl: ocaml: avoid
> reserved words in type and field names."):
> > > On Mon, 2013-10-28 at 15:24 +0000, Ian Jackson wrote:
> > > > That would be fine by me. I would marginally prefer to simply
> > > > dump a list of the ocaml keywords into the ocaml idl generator.
> > >
> > > http://caml.inria.fr/pub/docs/manual-ocaml-4.01/manual044.html
> seems
> > > to have a list, I suppose it is reasonably static across ocaml updates?
> > > It's not too insane to include it all now. Using most of them in our
> > > ABI would be a bug in our ABI IMHO
> >
> > Right.
> >
> > > and/or are already C reserved words (e.g. "else", "false" etc).
> >
> > Irrelevant now, but I would be tempted to say that if we would really
> > want to pick a C reserved word for an IDL item we should do a similar
> > workaround for C. Ie I don't think C should be special.
>
> Sounds reasonable.
Ok, so I'll change the patch to include the list of OCaml keywords, and have
the munge function add an "xl_" prefix to those and only those names that are
in the list.
Thanks,
Rob
> > But C's set
> > of reserved words is small enough that it's not very likely.
>
> Yes.
>
> > And even more irrelevant: this happened to me in a previous life. We
> > had an IDL-based code generator. One of the fields in one of our
> > structs was called "export". A few years later, the C++ people
> > decided to introduce a new keyword, "export". We were quite cross...
>
> I can imagine ;-)
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |