in reply to Re^3: how array variables are stored in memory
in thread how array variables are stored in memory
You kind of have to read both at the same time; they each assume deep knowledge of the other (which is pretty much how your entire XS learning experience will be).
Inline with Inline::C is probably the easiest way to get started, as it allows you to do the simple things without getting bogged down in internals. Then as you start to venture into solving more difficult problems, you can start adding knowledge gleaned from perlguts. Another trick is to think of some function that you know exists in XS form on CPAN. Read its source code. It will look like chicken scratch. Then investigate why each line is there (by reading perlguts, perlapi, perlcall, perlxstut, and so on). When you're done, you'll understand why it's written how it is written. You may discover a bug or two along the way. ;) And you'll be able to apply those patterns you learned to some of your own work.
Dave
|
|---|