Index: trunk/src/data_parent.h =================================================================== --- trunk/src/data_parent.h (revision 23158) +++ trunk/src/data_parent.h (revision 23159) @@ -49,6 +49,7 @@ pcb_data_t *data; pcb_subc_t *subc; pcb_board_t *board; + pcb_net_t *net; }; #define PCB_PARENT_TYPENAME_layer PCB_PARENT_LAYER Index: trunk/src/netlist2.c =================================================================== --- trunk/src/netlist2.c (revision 23158) +++ trunk/src/netlist2.c (revision 23159) @@ -65,6 +65,8 @@ if (alloc) { t = calloc(sizeof(pcb_net_term_t), 1); t->type = PCB_OBJ_NET_TERM; + t->parent_type = PCB_PARENT_NET; + t->parent.net = net; t->refdes = pcb_strdup(refdes); t->term = pcb_strdup(term); pcb_termlist_append(&net->conns, t); @@ -107,7 +109,7 @@ return pcb_true; } -pcb_net_t *pcb_net_get(pcb_netlist_t *nl, const char *netname, pcb_bool alloc) +pcb_net_t *pcb_net_get(pcb_board_t *pcb, pcb_netlist_t *nl, const char *netname, pcb_bool alloc) { pcb_net_t *net; @@ -123,8 +125,10 @@ if (alloc) { net = calloc(sizeof(pcb_net_t *), 1); + net->type = PCB_OBJ_NET; + net->parent_type = PCB_PARENT_BOARD; + net->parent.board = pcb; net->name = pcb_strdup(netname); - net->type = PCB_OBJ_NET; htsp_set(nl, net->name, net); return net; } Index: trunk/src/netlist2.h =================================================================== --- trunk/src/netlist2.h (revision 23158) +++ trunk/src/netlist2.h (revision 23159) @@ -70,7 +70,7 @@ void pcb_netlist_uninit(pcb_netlist_t *nl); /* Look up (or allocate) a net by name within a netlist. Returns NULL on error */ -pcb_net_t *pcb_net_get(pcb_netlist_t *nl, const char *netname, pcb_bool alloc); +pcb_net_t *pcb_net_get(pcb_board_t *pcb, pcb_netlist_t *nl, const char *netname, pcb_bool alloc); /* Remove a net from a netlist by namel returns 0 on removal, -1 on error */ int pcb_net_del(pcb_netlist_t *nl, const char *netname);