[m-rev.] for review: io.primitives_{read,write}.m

Julien Fischer jfischer at opturion.com
Sat Mar 12 15:01:48 AEDT 2022


On Sat, 12 Mar 2022, Zoltan Somogyi wrote:

> 2022-03-12 14:35 GMT+11:00 "Julien Fischer" <jfischer at opturion.com>:

>>> +%---------------------------------------------------------------------------%
>>> +:- implementation.
>>> +%---------------------------------------------------------------------------%
>>
>> This code is lacking a C foreign_decl that #includes stdint.h, inttypes.h
>> mercury_int.h.  (Conversely, those headers may not be #included in io.m's
>> C foreign_decl block.)
>
> Even io.m did not directly #include stdint.h; it got it indirectly via
> mercury_int.h.
>
> I added #includes of mercury_types.h, mercury_int.h and inttypes.h
> to make the code self-contained, though this file gets them anyway through
> io.m.
>
> If, by the last bit, you mean that those #includes could be deleted
> from io.m as unneeded, I would prefer to do that once, when this
> batch of changes to io.m is done.
>
>> As a generaly point, I would fully qualify things in Java and C# foreign_procs.
>
> Good idea. Problem is, I do not know what the fully qualified names are :-(
> Care to educate me on that?

I can get the reference manual to do that for for me ;-)
The sections (15.3.2 and 15.3.3)  on C# and Java data passing
conventions contain the information you are after, specifically, the bit
I suspect you need is:

For C#:

     C# code generated by the Mercury compiler is placed in the ‘mercury’
     namespace.

For Java, reference:

     Java code generated by the Mercury compiler is placed in the ‘jmercury’
     package.

Julien.


More information about the reviews mailing list