[m-rev.] for (possibly post-commit) review: simplify the creation of .int files

Julien Fischer jfischer at opturion.com
Mon Feb 18 16:58:40 AEDT 2019



On Mon, 18 Feb 2019, Zoltan Somogyi wrote:

>
>
> 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?

Sure.

Julien.


More information about the reviews mailing list