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 }
In reply to Re: Trees using Inline::C
by esskar
in thread Trees using Inline::C
by rvosa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |