X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=Magic.xs;h=edddac8a3574a85a7a7791d54eef1e3fbcf8a9fc;hb=cd2cbc62bac1de874dfc366031de9b10b852defb;hp=f26774dddf4a830ecddf812e3b295693e7546e4d;hpb=f3d1fc8f344c277db7b21ba986d3f0bef458c3d8;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/Magic.xs b/Magic.xs index f26774d..edddac8 100644 --- a/Magic.xs +++ b/Magic.xs @@ -1340,6 +1340,7 @@ SV *_wizard(...) PROTOTYPE: DISABLE PREINIT: I32 i = 0; + UV opinfo; MGWIZ *w; MGVTBL *t; SV *cb; @@ -1365,10 +1366,13 @@ CODE: Newx(w, 1, MGWIZ); VMG_SET_CB(ST(i++), data); + cb = ST(i++); - w->opinfo = SvOK(cb) ? SvUV(cb) : 0; + opinfo = SvOK(cb) ? SvUV(cb) : 0; + w->opinfo = (U8) ((opinfo < 255) ? opinfo : 255); if (w->opinfo) vmg_op_info_init(w->opinfo); + VMG_SET_SVT_CB(ST(i++), get); VMG_SET_SVT_CB(ST(i++), set); VMG_SET_SVT_CB(ST(i++), len);