in reply to Trees using Inline::C
but i would prefer to set parent to NULL inside the new function, and add an iditional member named "class" to your struct treeNode to ensure the same class nameSV* get_parent(SV* obj) { Node *node = (Node *)SvIV(SvRV(obj)); if(node != NULL && node->parent != NULL) return new( "Node", node->parent->name, node->parent->desc, node->parent->branch_length ); else return NULL; // not sure }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Trees using Inline::C
by rvosa (Curate) on Aug 01, 2005 at 00:31 UTC | |
by esskar (Deacon) on Aug 01, 2005 at 08:22 UTC | |
by rvosa (Curate) on Aug 01, 2005 at 14:42 UTC |