[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: Incorrect type in ob-C.el for D code [8.3.4 (8.3.4-elpa @ ~

From: Thierry Banel
Subject: Re: [O] Bug: Incorrect type in ob-C.el for D code [8.3.4 (8.3.4-elpa @ ~/.emacs.d/elpa/org-20160222/)]
Date: Sun, 20 Mar 2016 15:31:32 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

Attached is a patch to keep Babel D compliant
with the latest version of the language.

Thanks Chris for reporting.

Le 25/02/2016 21:23, Nicolas Goaziou a écrit :
> Hello,
> Chris Andrews <address@hidden> writes:
>> Issue is fairly straightforward.  When evaluating a D code block that
>> includes a table var, this error is thrown by the DMD compiler.
>> ~\Temp\babel-1032v-N\C-src-1032Xig.d(25): Error: cannot implicitly convert
>> expression (row) of type ulong to uint
>> Failed: ["dmd", "-v", "-o-", "~/Temp/babel-1032v-N/C-src-1032Xig.d",
>> "-I~/Local/Temp/babel-1032v-N"]
>> The type `ulong` is not appropriate for the generated code, as it
>> represents an array index.  The fix is to change line 434 in ob-C.el from:
>>  "string %s_h (ulong row, string col) { return
>> %s[row][get_column_num(%s_header,col)]; }"
>> to read:
>>  "string %s_h (size_t row, string col) { return
>> %s[row][get_column_num(%s_header,col)]; }"
>> The use of `size_t` is correct for array indexes, and fixes the error in
>> the compiler.
> Thank you for the report. 
> Do you want to provide a patch for that? See
> <http://orgmode.org/worg/org-contribute.html> for details, if you're
> interested.
> Regards,

Attachment: 0001-use-size_t-in-babel-D.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]