Re: [perl #29380] [Test PATCH] Accessing Pointers in Structs as Aggregates

2004-05-09 Thread Leopold Toetsch
Chromatic <[EMAIL PROTECTED]> wrote: > Count: 4 > 0: 263958416 > 1: 0 > 2: 263958412 > 3: 264243256 And differently here. What your struct layout is describing was: struct container { int count; int ar[2]; }; But you get from nci_p_ a pointer to:

Re: [perl #29380] [Test PATCH] Accessing Pointers in Structs as Aggregates

2004-05-08 Thread chromatic
On Wed, 2004-05-05 at 22:54, Leopold Toetsch wrote: > > I'd like to be able to access pixels (an array of Uint32s) directly in > > some cases. > > + set P2[ 'i' ], .DATATYPE_PTR > Why not just define an array of uintvals? The pointer type does nothing > useful AFAIK. It's true that the pointer

Re: [perl #29380] [Test PATCH] Accessing Pointers in Structs as Aggregates

2004-05-06 Thread Leopold Toetsch
Chromatic <[EMAIL PROTECTED]> wrote: > typedef struct SDL_Surface { > void *pixels; /* Read-write */ > ... > } > I'd like to be able to access pixels (an array of Uint32s) directly in > some cases. > + set P2[ 'i' ], .DATATYPE_PTR Why not

[perl #29380] [Test PATCH] Accessing Pointers in Structs as Aggregates

2004-05-05 Thread via RT
# New Ticket Created by chromatic # Please include the string: [perl #29380] # in the subject line of all future correspondence about this issue. # http://rt.perl.org:80/rt3/Ticket/Display.html?id=29380 > I have an array hanging off of a struct: typedef struct SDL_Surface {