- {
- dMY_CXT;
- (void) hv_store(MY_CXT.map, c->name, c->namelen, key, 0);
+ dupe->name = so_strndup(orig->name, orig->namelen);
+ dupe->namelen = orig->namelen;
+
+ dupe->proto = so_strndup(orig->proto, orig->protolen);
+ dupe->protolen = orig->protolen;
+
+ dupe->call = orig->call;
+ dupe->ref = orig->ref;
+ dupe->ud = orig->ud;
+
+ return dupe;
+}
+
+void sub_op_free(pTHX_ sub_op_config_t *c) {
+ PerlMemShared_free((char *) c->name);
+ PerlMemShared_free(c);
+
+ return;
+}
+
+OP *sub_op_study(const OP *o, OP **last_arg_p, OP **rv2cv_p) {
+ OP *ex_list, *last_arg, *rv2cv, *gvop;
+
+ ex_list = cUNOPo->op_first;
+ /* pushmark when a method call */
+ if (!ex_list || ex_list->op_type != OP_NULL)
+ goto skip;
+
+ rv2cv = cUNOPx(ex_list)->op_first;
+ if (!rv2cv)
+ goto skip;
+
+ while (1) {
+ OP *next = rv2cv->op_sibling;
+ if (!next)
+ break;
+ last_arg = rv2cv;
+ rv2cv = next;