C callbacks getting a value of 0! Bug in D?
Moritz Maxeiner via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Aug 28 15:41:56 PDT 2017
On Monday, 28 August 2017 at 22:21:18 UTC, Johnson Jones wrote:
> On Monday, 28 August 2017 at 21:35:27 UTC, Steven Schveighoffer
> wrote:
>> On 8/27/17 10:17 PM, Johnson Jones wrote:
>>> [...]
>>
>> For C/C++ interaction, always use c_... types if they are
>> available. The idea is both that they will be correctly
>> defined for the width, and also it will mangle correctly for
>> C++ compilers (yes, long and int are mangled differently even
>> when they are the same thing).
>>
>> -Steve
>
> and where are these c_ types defined? The reason I replaced
> them was precisely because D was not finding them.
core.stdc.config
, which unfortunately doesn't appear in the online documentation
AFAICT (something that ought to be fixed).
A common workaround is to use pattern searching tools like grep
if you know the phrase to look for:
$ grep -Er c_long /path/to/imports
, or in this case, since these things are usually done with
aliases:
$ grep -Er 'alias\s+\w*\s+c_long' /path/to/imports
More information about the Digitalmars-d-learn
mailing list