ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtperl.xs
(Generate patch)

Comparing rxvt-unicode/src/rxvtperl.xs (file contents):
Revision 1.253 by root, Sat Jul 24 11:58:27 2021 UTC vs.
Revision 1.254 by root, Sun Nov 21 15:15:02 2021 UTC

1374 1374
1375SV * 1375SV *
1376rxvt_term::locale_encode (SV *str) 1376rxvt_term::locale_encode (SV *str)
1377 CODE: 1377 CODE:
1378{ 1378{
1379 if (!SvOK (str))
1380 XSRETURN_UNDEF;
1381
1379 wchar_t *wstr = sv2wcs (str); 1382 wchar_t *wstr = sv2wcs (str);
1380 1383
1381 rxvt_push_locale (THIS->locale); 1384 rxvt_push_locale (THIS->locale);
1382 char *mbstr = rxvt_wcstombs (wstr); 1385 char *mbstr = rxvt_wcstombs (wstr);
1383 rxvt_pop_locale (); 1386 rxvt_pop_locale ();
1392 1395
1393SV * 1396SV *
1394rxvt_term::locale_decode (SV *octets) 1397rxvt_term::locale_decode (SV *octets)
1395 CODE: 1398 CODE:
1396{ 1399{
1400 if (!SvOK (octets))
1401 XSRETURN_UNDEF;
1402
1397 STRLEN len; 1403 STRLEN len;
1398 char *data = SvPVbyte (octets, len); 1404 char *data = SvPVbyte (octets, len);
1399 1405
1400 rxvt_push_locale (THIS->locale); 1406 rxvt_push_locale (THIS->locale);
1401 wchar_t *wstr = rxvt_mbstowcs (data, len); 1407 wchar_t *wstr = rxvt_mbstowcs (data, len);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines