Re: Creation of 0MQ D project

2014-10-28 Thread via Digitalmars-d-learn

On Tuesday, 28 October 2014 at 00:21:20 UTC, anonymous wrote:

On Monday, 27 October 2014 at 23:56:11 UTC, Evan Lowry wrote:
../../.dub/packages/zeromq-master/deimos/zmq/zmq.d(96): Error: 
function deimos.zmq.zmq.zmq_strerror without 'this' cannot be 
const


You found a bug in the binding.

Line 96 of zmq.d [1]: const char* zmq_strerror(int errnum);
Should be: const(char)* zmq_strerror(int errnum);


Ceterum censeo ...
https://github.com/D-Programming-Language/dmd/pull/4043


Re: Creation of 0MQ D project

2014-10-27 Thread anonymous via Digitalmars-d-learn

On Monday, 27 October 2014 at 23:56:11 UTC, Evan Lowry wrote:
../../.dub/packages/zeromq-master/deimos/zmq/zmq.d(96): Error: 
function deimos.zmq.zmq.zmq_strerror without 'this' cannot be 
const


You found a bug in the binding.

Line 96 of zmq.d [1]: const char* zmq_strerror(int errnum);
Should be: const(char)* zmq_strerror(int errnum);

I think until recently dmd would accept and ignore const on a
free function, and that's how the bug got through.

[1]
https://github.com/D-Programming-Deimos/ZeroMQ/blob/79fb14b880c172e9aba9701366fd9bc15a8644b1/deimos/zmq/zmq.d#L96


Re: Creation of 0MQ D project

2014-10-27 Thread Evan Lowry via Digitalmars-d-learn

On Tuesday, 28 October 2014 at 00:21:20 UTC, anonymous wrote:

Line 96 of zmq.d [1]: const char* zmq_strerror(int errnum);
Should be: const(char)* zmq_strerror(int errnum);


Yep, this seemed to do the trick cleanly. S'all compiling and the 
examples provided in the repo run. Can submit a pull request, if 
no-one else has one lined up.


Much thanks!


Re: Creation of 0MQ D project

2014-10-27 Thread Matt Soucy via Digitalmars-d-learn
On 10/27/2014 09:02 PM, Evan Lowry wrote:
 On Tuesday, 28 October 2014 at 00:21:20 UTC, anonymous wrote:
 Line 96 of zmq.d [1]: const char* zmq_strerror(int errnum);
 Should be: const(char)* zmq_strerror(int errnum);
 
 Yep, this seemed to do the trick cleanly. S'all compiling and the examples 
 provided in the repo run. Can submit a pull request, if no-one else has one 
 lined up.
 
 Much thanks!
From the original commit that caused that, it seems that const(char)* was meant 
for that statement..?

-- 
Matt Soucy
http://msoucy.me/



signature.asc
Description: OpenPGP digital signature