ImportC and nothrow/@nogc?

Timon Gehr timon.gehr at gmx.ch
Thu Aug 29 21:09:40 UTC 2024


On 8/28/24 00:04, Walter Bright wrote:
> On 8/26/2024 11:12 AM, Timon Gehr wrote:
>> Marking every C function `@trusted` would not solve his problem. What 
>> would solve his problem is if ImportC supported C extensions that let 
>> you mark groups of declarations using D attributes. Then you can put 
>> those in the C files that you import.
> 
> People are very reluctant to modify their C files, as they usually come 
> from outside their organization. I've done a lot of work on ImportC to 
> get it to work with unmodified C code.
> 
> Note that Manu rejected my suggestion to use ImportC to generate .di 
> files of the function prototypes, and then edit in the attributes. This 
> is equivalent to your suggestion.

No, this is completely different to my suggestion.


More information about the Digitalmars-d mailing list