in reply to Re^6: odd line in windows
in thread odd line in windows
yet it's not what I naively expected.
I have similar reservations about the Object Oriented Inline example in the cookbook:
SV* new(char* class, char* name, char* rank, long serial) { Soldier* soldier; SV* obj_ref = newSViv(0); SV* obj = newSVrv(obj_ref, class); New(42, soldier, 1, Soldier); soldier->name = savepv(name); soldier->rank = savepv(rank); soldier->serial = serial; sv_setiv(obj, (IV)soldier); SvREADONLY_on(obj); return obj_ref; }
obj_ref is an IV (set to 0), pointed at by obj which is an RV, who's IV is set to the address of the struct and then set read only. But then it is obj_ref that is returned.
Then again, I find almost nothing about XS intuitive and the documentation is shite. If you ask questions about it you either get no answers or an answer of "Do this", with no explanation of why that works. And that smacks of the passing on of rote learnt knowledge with no true understanding. If there is anyone left who really understands this stuff, they are keeping that knowledge firmly to themselves.
If I could get help in understanding this stuff I might have published a whole lot more of my half-finished, but dead-in-the-water projects.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: odd line in windows
by syphilis (Archbishop) on Sep 08, 2011 at 13:24 UTC | |
by BrowserUk (Patriarch) on Sep 08, 2011 at 15:28 UTC | |
by syphilis (Archbishop) on Sep 09, 2011 at 00:21 UTC | |
|
Re^8: odd line in windows (names, XS)
by tye (Sage) on Sep 08, 2011 at 16:51 UTC | |
by BrowserUk (Patriarch) on Sep 08, 2011 at 16:56 UTC | |
|
Re^8: odd line in windows
by ikegami (Patriarch) on Sep 08, 2011 at 20:00 UTC | |
by BrowserUk (Patriarch) on Sep 08, 2011 at 20:12 UTC | |
by ikegami (Patriarch) on Sep 08, 2011 at 22:22 UTC | |
by BrowserUk (Patriarch) on Sep 08, 2011 at 22:29 UTC | |
by ikegami (Patriarch) on Sep 08, 2011 at 22:50 UTC | |
| |
by ikegami (Patriarch) on Sep 08, 2011 at 21:06 UTC |