- {
- sub_op_name_t *on = PerlMemShared_malloc(sizeof(*on) + len);
- Copy(name, &on->buf, len, char);
- (&on->buf)[len] = '\0';
- on->len = len;
-#ifdef USE_ITHREADS
- MUTEX_LOCK(&sub_op_name_mutex);
-#endif /* USE_ITHREADS */
- ptable_store(sub_op_name, o, on);
-#ifdef USE_ITHREADS
- MUTEX_UNLOCK(&sub_op_name_mutex);
-#endif /* USE_ITHREADS */
+ if (c->ref) {
+ OP *new_kid = CALL_FPTR(c->ref)(aTHX_ kid, c->ud);
+
+ if (new_kid != kid) {
+ new_kid->op_sibling = kid->op_sibling;
+ new_kid->op_next = new_kid;
+ if (prev)
+ prev->op_sibling = new_kid;
+ else
+ cUNOPx(parent)->op_first = new_kid;
+ op_null(kid);
+ kid = new_kid;
+ }