On 4/15/15 8:35 AM, CraigDillabaugh wrote:
On Wednesday, 15 April 2015 at 11:18:03 UTC, Steven Schveighoffer wrote:
immutable blocksize = GByte.sizeof * x_block_size * y_block_size;
auto buffer = malloc(blocksize)[0..blocksize];
Also, you don't need to cast pointers to void *. Should be able
On Wednesday, 15 April 2015 at 11:18:03 UTC, Steven Schveighoffer
wrote:
On 4/15/15 12:47 AM, Daniel Kozak wrote:
On Wednesday, 15 April 2015 at 04:43:39 UTC, Daniel Kozák
wrote:
On Wed, 15 Apr 2015 04:24:20 +
Craig Dillabaugh via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com
On Wednesday, 15 April 2015 at 11:18:03 UTC, Steven Schveighoffer
wrote:
clip
Depends on what GByte is. If it doesn't contain pointers (I'm
assuming its probably ubyte?), then it won't be scanned.
clip
-Steve
Yes, GByte is an alias for ubyte.
On Wednesday, 15 April 2015 at 14:02:38 UTC, Steven Schveighoffer
wrote:
On 4/15/15 8:35 AM, CraigDillabaugh wrote:
On Wednesday, 15 April 2015 at 11:18:03 UTC, Steven
Schveighoffer wrote:
immutable blocksize = GByte.sizeof * x_block_size *
y_block_size;
auto buffer =
On 4/15/15 11:02 AM, CraigDillabaugh wrote:
Nice. Thanks. I didn't realize you can slice a bare pointer like that.
Does druntime have any way of making sure that is safe, or are you on
your own?
No, druntime cannot know what the pointer actually points at. This would
not work in @safe
On 4/15/15 12:47 AM, Daniel Kozak wrote:
On Wednesday, 15 April 2015 at 04:43:39 UTC, Daniel Kozák wrote:
On Wed, 15 Apr 2015 04:24:20 +
Craig Dillabaugh via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
Hi.
I want to call a C library function that returns a data buffer as
On Wednesday, 15 April 2015 at 04:43:39 UTC, Daniel Kozák wrote:
On Wed, 15 Apr 2015 04:24:20 +
Craig Dillabaugh via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
Hi.
I want to call a C library function that returns a data buffer
as a void*. How do I convert the resulting
On Wed, 15 Apr 2015 04:24:20 +
Craig Dillabaugh via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
Hi.
I want to call a C library function that returns a data buffer as
a void*. How do I convert the resulting void* into something I
can process in D?
//I have the
On Wednesday, 15 April 2015 at 04:43:39 UTC, Daniel Kozák wrote:
On Wed, 15 Apr 2015 04:24:20 +
Craig Dillabaugh via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
Hi.
I want to call a C library function that returns a data buffer
as a void*. How do I convert the resulting
Hi.
I want to call a C library function that returns a data buffer as
a void*. How do I convert the resulting void* into something I
can process in D?
//I have the following function from the GDAL C library.
extern(C) CPLErr GDALReadBlock( GDALRasterBandH, int, int, void*
);
So I have
On Wed, 15 Apr 2015 04:24:20 +
Craig Dillabaugh via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
Hi.
I want to call a C library function that returns a data buffer as
a void*. How do I convert the resulting void* into something I
can process in D?
//I have the
11 matches
Mail list logo