Accessing an array inside a structure

12 Nov
2005
12 Nov
'05
1:11 p.m.
Hello There appears to be a bug. Accessing a member array of a C structure via a get hook, produces a pointer read off the array, instead of a pointer to the array: test.chs----------------------------------------- #c typedef struct { char str[10]; } t; t x = { "blah" }; #endc foo = {# get t.str #} ------------------------------------------------- Translates to: test.hs------------------------------------------ ... foo = (\ptr -> do {peekByteOff ptr 0 ::IO (Ptr CChar)}) ... ------------------------------------------------- Regards, V.W. -- public key fingerprint: 6A10 66F1 40A2 C441 BB55 0AA8 FAB1 4FC1 08BE 24EF
7129
Age (days ago)
7129
Last active (days ago)
0 comments
1 participants
participants (1)
-
Volker Wysk