some proposed changes
Huw Rogers <[email protected]> Fri, 03 May 2002 02:57:28 +0900
| Newsgroups | gmane.comp.gnome.orbit.perl |
|---|---|
| Message-ID | <[email protected]> |
After some hacking I made recursive types work. It was actually surprisingly easy. I also want to propose changes to the way structure, sequence and any marshalling work: * if a structure field is not defined in the Perl hash, then it is marshalled as if an undefined scalar. Right now it dies, which requires Perl scripters to exhaustively initialize every structure member even if they'd prefer the ones they leave out to default to undef. It would also be consistent with C struct usage (where unmentioned struct members in static initializers default to zero-initialized memory) to have default undef behaviour. * if a sequence is undef, it is marshalled as a zero length sequence. Right now if it is not a true reference to an array it dies. * if an any is undef, it is marshalled as a null Any. Right now if it is not a true reference to a 2 element array it dies. If anyone disagrees with the above, then plz speak out. Unless there's disagreement, I'm going to include these changes in 0.4.4. -Huw -- Huw Rogers <[email protected]>