On Tue, 2004-05-04 at 00:48, Leopold Toetsch wrote:

> Yes, the code didn't handle this case where we are creating nested
> structures, which are chained by pointers. Should be fixed now, i.e. the
> test succeeds now.

Thanks, that does make the test pass here.

Now for the case when applying a layout to an UnManagedStruct created
and returned from a C function, will this overwrite nested structs and
struct pointers?

Maybe the assignment belongs in ManagedStruct and UnManagedStruct should
grab the data from the right location according to the layout
initializer.

This test's a little harder to write, but if you call SDL_SetVideoMode,
apply the SDL_Surface layout to the return value, and try to access
surface->layout->BytesPerPixel, you'll see what I mean.

-- c

Reply via email to