p = fmt;
while ((q = strchr(p, ' '))) {
- XPUSHs(sv_2mortal(newSVpv(p, p - q)));
+ XPUSHs(sv_2mortal(newSVpvn(p, p - q)));
p = q + 1;
}
continue;
}
- (void)hv_store(rad_hv, key, strlen(key), newSVpv(value, strlen(value)), 0);
+ (void)hv_store(rad_hv, key, strlen(key), newSVpvn(value, strlen(value)), 0);
DEBUG("%*s%s = %s", indent_item, " ", key, value);
}
next = fr_cursor_next_by_da(&cursor, vp->da, vp->tag)) {
switch (vp->da->type) {
case PW_TYPE_STRING:
- av_push(av, newSVpv(next->vp_strvalue, next->length));
- RDEBUG("<-- %s = %s", next->da->name, next->vp_strvalue);
+ RDEBUG("<-- %s = %s", next->da->name, next->vp_strvalue);
+ av_push(av, newSVpvn(next->vp_strvalue, next->length));
break;
default:
len = vp_prints_value(buffer, sizeof(buffer), next, 0);
RDEBUG("<-- %s = %s", next->da->name, buffer);
- av_push(av, newSVpv(buffer, truncate_len(len, sizeof(buffer))));
+ av_push(av, newSVpvn(buffer, truncate_len(len, sizeof(buffer))));
break;
}
}
switch (vp->da->type) {
case PW_TYPE_STRING:
RDEBUG("<-- %s = %s", vp->da->name, vp->vp_strvalue);
- (void)hv_store(rad_hv, name, strlen(name), newSVpv(vp->vp_strvalue, vp->length), 0);
+ (void)hv_store(rad_hv, name, strlen(name), newSVpvn(vp->vp_strvalue, vp->length), 0);
break;
default:
len = vp_prints_value(buffer, sizeof(buffer), vp, 0);
RDEBUG("<-- %s = %s", vp->da->name, buffer);
- (void)hv_store(rad_hv, name, strlen(name), newSVpv(buffer, truncate_len(len, sizeof(buffer))), 0);
+ (void)hv_store(rad_hv, name, strlen(name),
+ newSVpvn(buffer, truncate_len(len, sizeof(buffer))), 0);
break;
}
}