ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Coro/State.xs
(Generate patch)

Comparing Coro/Coro/State.xs (file contents):
Revision 1.400 by root, Thu May 12 23:55:39 2011 UTC vs.
Revision 1.401 by root, Mon May 16 22:08:24 2011 UTC

967#endif 967#endif
968 968
969/* 969/*
970 * This overrides the default magic get method of %SIG elements. 970 * This overrides the default magic get method of %SIG elements.
971 * The original one doesn't provide for reading back of PL_diehook/PL_warnhook 971 * The original one doesn't provide for reading back of PL_diehook/PL_warnhook
972 * and instead of trying to save and restore the hash elements, we just provide 972 * and instead of trying to save and restore the hash elements (extremely slow),
973 * readback here. 973 * we just provide our own readback here.
974 */ 974 */
975static int 975static int
976coro_sigelem_get (pTHX_ SV *sv, MAGIC *mg) 976coro_sigelem_get (pTHX_ SV *sv, MAGIC *mg)
977{ 977{
978 const char *s = MgPV_nolen_const (mg); 978 const char *s = MgPV_nolen_const (mg);
1086 PL_parser = 0; 1086 PL_parser = 0;
1087#endif 1087#endif
1088 PL_hints = 0; 1088 PL_hints = 0;
1089 1089
1090 /* recreate the die/warn hooks */ 1090 /* recreate the die/warn hooks */
1091 PL_diehook = 0; SvSetMagicSV (*hv_fetch (hv_sig, "__DIE__" , sizeof ("__DIE__" ) - 1, 1), rv_diehook ); 1091 PL_diehook = SvREFCNT_inc (rv_diehook);
1092 PL_warnhook = 0; SvSetMagicSV (*hv_fetch (hv_sig, "__WARN__", sizeof ("__WARN__") - 1, 1), rv_warnhook); 1092 PL_warnhook = SvREFCNT_inc (rv_warnhook);
1093 1093
1094 GvSV (PL_defgv) = newSV (0); 1094 GvSV (PL_defgv) = newSV (0);
1095 GvAV (PL_defgv) = coro->args; coro->args = 0; 1095 GvAV (PL_defgv) = coro->args; coro->args = 0;
1096 GvSV (PL_errgv) = newSV (0); 1096 GvSV (PL_errgv) = newSV (0);
1097 GvSV (irsgv) = newSVpvn ("\n", 1); sv_magic (GvSV (irsgv), (SV *)irsgv, PERL_MAGIC_sv, "/", 0); 1097 GvSV (irsgv) = newSVpvn ("\n", 1); sv_magic (GvSV (irsgv), (SV *)irsgv, PERL_MAGIC_sv, "/", 0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines