Hi all,
I have a data structure that is a linked list. In my XSUB, I'd like to
traverse that linked list and return the list as an array of objects.
Here's some of my code so far:
void
tracks( self )
llist_node *self
PREINIT:
llist_node *node;
PPCODE:
node = self;
while( node != NULL ) {
EXTEND(SP, 1);
PUSHs( ???? ); <-- What goes here?
node = node->next;
}
I hope you can see the part where I have no clue as to what to do :^)>.
llist_node * is defined in my typemap as an O_OBJECT and returns a
blessed scalar. I've tried:
PUSHs( sv_2mortal( node ));
to no great success. I've run about a dozen Google searches in addition
to the half-dozen or so searches on the archives of this list. Couldn't
find this kind of information. Can someone please help?
Thanks in advance!
- m.