<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1561.4">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 15.0px; font: 14.0px 'Inconsolata-dz for Powerline'}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 15.0px; font: 14.0px 'Inconsolata-dz for Powerline'; color: #008e00; min-height: 20.0px}
p.p3 {margin: 0.0px 0.0px 0.0px 24.0px; font: 14.0px 'Inconsolata-dz for Powerline'; color: #008e00}
p.p4 {margin: 0.0px 0.0px 0.0px 24.0px; font: 14.0px 'Inconsolata-dz for Powerline'; color: #008e00; min-height: 20.0px}
p.p5 {margin: 0.0px 0.0px 0.0px 12.0px; font: 14.0px 'Inconsolata-dz for Powerline'; color: #011892; min-height: 20.0px}
p.p6 {margin: 0.0px 0.0px 0.0px 12.0px; font: 14.0px 'Inconsolata-dz for Powerline'; color: #011892}
p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 17.0px; font: 14.0px 'Inconsolata-dz for Powerline'; min-height: 20.0px}
p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 17.0px; font: 14.0px 'Inconsolata-dz for Powerline'}
p.p9 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px 'Inconsolata-dz for Powerline'; min-height: 20.0px}
p.p10 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px 'Inconsolata-dz for Powerline'; color: #929292}
</style>
</head>
<body>
<p class="p1">On 2018-05-16 17:46:59 +0000, Steven Schveighoffer said:</p>
<p class="p2"><br></p>
<p class="p3">Well, for C see above on the D side:</p>
<p class="p4"><br></p>
<p class="p3">    extern(C) {</p>
<p class="p3">          result myfunc(double x, double y, const char *text, stuff *myStuff, bool measureOnly);</p>
<p class="p3">    }</p>
<p class="p5"><br></p>
<p class="p6">Shouldn't the result be a pointer?</p>
<p class="p7"><br></p>
<p class="p8">Indeed. And you know what? That was causing the problem.</p>
<p class="p7"><br></p>
<p class="p8">So, having a wrong return-type here, resulted in the const char *text parameter always being NULL. Not sure I understand the relation but looks strange to me... at least not very obvious.</p>
<p class="p9"><br></p>
<p class="p10">--<span class="Apple-converted-space"> </span></p>
<p class="p10">Robert M. Münch</p>
<p class="p10">http://www.saphirion.com</p>
<p class="p10">smarter | better | faster</p>
</body>
</html>