[m-rev.] for (possibly post-commit) review: simplify the creation of .int files
Zoltan Somogyi
zoltan.somogyi at runbox.com
Mon Feb 18 14:56:28 AEDT 2019
On Mon, 18 Feb 2019 03:34:35 +0000 (UTC), Julien Fischer <jfischer at opturion.com> wrote:
> >> We do not necessarily know if a foreign type is going to be larger than a word
> >> in size, since that can vary depending on the target platform For example:
> >>
> >> :- pragma foreign_type("C", foo, "int64_t").
> >>
> >> I think the most useful additional annotation we could have on foreign types,
> >> would be one that allowed their size (or at least an upper bound on their size)
> >> to be specified.
> >
> > It seems you and I are in agreement, but I don't know whether you meant
> > the above to be a request for a clarification of the comment, and if so,
> > in what respect.
>
> What I meant was that something like following is not likely to be useful
>
> :- pragma_foreign_type("C", foo, "some_c_type",
> [larger_than_a_word_sized_type]).
>
> since being word sized or not is likely to vary between target
> platforms. If a new attribute is added then it needs to account for
> that.
Yes, I know; that comment was not meant as a *specific* proposal for
a new attribute.
Would an explicit proposal for a "MAYBE_larger_than_word_sized_type"
attribute in the comment, together with an acknowledgement that
sizes may vary across platforms, including wrt word sizes, address
your concern?
> > Did any issues come up since I committed this diff and its successor?
>
> rotd-2019-02-15 contained this diff; rotd-2019-02-16 contained its
> successor, both the builds and subsequent test runs on
> testing.mercurylang.org haven't revealed any problems with either diff.
Thanks.
Zoltan.
More information about the reviews
mailing list