<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span>I still want to say, extern(C) does not mean C function. It means C linkage/calling convention. The function can easily be implemented in D (druntime is full of this).</span></div><div><br><span></span></div><div><span>-Steve<br></span></div><div><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;"> <div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Michel Fortin <michel.fortin@michelf.com><br> <b><span style="font-weight: bold;">To:</span></b> Discuss the dmd beta releases for D <dmd-beta@puremagic.com> <br> <b><span
style="font-weight: bold;">Sent:</span></b> Thursday, April 12, 2012 5:34 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [dmd-beta] rvalue references<br> </font> </div> <br>Le 2012-04-12 à 17:24, Andrej Mitrovic a écrit :<br><br>> Currently you don't have to use address-of operator if you mark the<br>> extern(C) function as taking ref:<br>> <br>> extern(C) void c_modify_int(ref int x) { }<br>> void modify_int(ref int x)<br>> {<br>> c_modify_int(x);<br>> }<br><br>Even if declaring C functions with ref is allowed, it can sometime be a problem to declare C functions like that. Not only it changes the usage, but also it's not too rare to see pointer parameters like this accepting a null pointer as a way to make the parameter optional, which ref won't let you do.<br><br>-- <br>Michel Fortin<br><a ymailto="mailto:michel.fortin@michelf.com"
href="mailto:michel.fortin@michelf.com">michel.fortin@michelf.com</a><br><a href="http://michelf.com/" target="_blank">http://michelf.com/</a><br><br><br><br>_______________________________________________<br>dmd-beta mailing list<br><a ymailto="mailto:dmd-beta@puremagic.com" href="mailto:dmd-beta@puremagic.com">dmd-beta@puremagic.com</a><br><a href="http://lists.puremagic.com/mailman/listinfo/dmd-beta" target="_blank">http://lists.puremagic.com/mailman/listinfo/dmd-beta</a><br><br><br> </div> </div> </blockquote></div> </div></body></html>