On Tuesday, 3 December 2013 at 16:52:29 UTC, Ali Çehreli wrote:
On 12/03/2013 06:45 AM, Chris wrote:
> I became aware of uninitialized variable. I think that the
latter
> behavior is the correct one (segfault > crash). But why did
it work
> correctly in the other D program, how did the C variabl
On 12/03/2013 06:45 AM, Chris wrote:
> I became aware of uninitialized variable. I think that the latter
> behavior is the correct one (segfault > crash). But why did it work
> correctly in the other D program, how did the C variable get initialized?
Undefined behavior sometimes manifests itself
On Tuesday, 3 December 2013 at 12:43:08 UTC, bearophile wrote:
You can file an enhancement request for the documentation, or
fix the docs yourself.
https://github.com/D-Programming-Language/dlang.org/pull/427
On Tuesday, 3 December 2013 at 14:18:35 UTC, John Colvin wrote:
On Tuesday, 3 December 2013 at 13:05:20 UTC, Mike Parker wrote:
On 12/3/2013 9:31 PM, John Colvin wrote:
You should be fine to free in that way as long as you haven't
done
anything crazy like separately static linking libc.
I
On Tuesday, 3 December 2013 at 13:05:20 UTC, Mike Parker wrote:
On 12/3/2013 9:31 PM, John Colvin wrote:
You should be fine to free in that way as long as you haven't
done
anything crazy like separately static linking libc.
I wouldn't advise this in the general case. When you have
complet
On Tuesday, 3 December 2013 at 13:05:20 UTC, Mike Parker wrote:
On 12/3/2013 9:31 PM, John Colvin wrote:
You should be fine to free in that way as long as you haven't
done
anything crazy like separately static linking libc.
I wouldn't advise this in the general case. When you have
complet
On 12/3/2013 9:31 PM, John Colvin wrote:
You should be fine to free in that way as long as you haven't done
anything crazy like separately static linking libc.
I wouldn't advise this in the general case. When you have complete
end-to-end control, sure. But if, for example, you're using a dyn
Chris:
std.c.stdlib.free() is mentioned on the "How to interface to C"
page (http://dlang.org/interfaceToC.html). So maybe that needs
an update.
You can file an enhancement request for the documentation, or fix
the docs yourself.
I'll file a little bug report for the other library deprecat
On Tuesday, 3 December 2013 at 12:31:16 UTC, John Colvin wrote:
On Tuesday, 3 December 2013 at 10:57:51 UTC, Chris wrote:
I have a C module that dynamically allocates memory for a
string like so:
char *result = (char*)malloc(length + 1); // 'length' has been
calculated
When I call it from D
On Tuesday, 3 December 2013 at 10:57:51 UTC, Chris wrote:
I have a C module that dynamically allocates memory for a
string like so:
char *result = (char*)malloc(length + 1); // 'length' has been
calculated
When I call it from D (via extern (C)), is it ok to free it
from there like so:
voi
10 matches
Mail list logo