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.124 by root, Thu Jul 31 03:24:08 2008 UTC vs.
Revision 1.125 by root, Fri Aug 22 15:36:45 2008 UTC

310{ 310{
311 if (perl) 311 if (perl)
312 { 312 {
313 perl_destruct (perl); 313 perl_destruct (perl);
314 perl_free (perl); 314 perl_free (perl);
315 PERL_SYS_TERM ();
315 } 316 }
316} 317}
317 318
318void 319void
319rxvt_perl_interp::init (rxvt_term *term) 320rxvt_perl_interp::init (rxvt_term *term)
323 rxvt_push_locale (""); // perl init destroys current locale 324 rxvt_push_locale (""); // perl init destroys current locale
324 325
325 perl_environ = rxvt_environ; 326 perl_environ = rxvt_environ;
326 swap (perl_environ, environ); 327 swap (perl_environ, environ);
327 328
328 char *argv[] = { 329 char *args[] = {
329 "", 330 "",
330 "-e" 331 "-e"
331 "BEGIN {" 332 "BEGIN {"
332 " urxvt->bootstrap;" 333 " urxvt->bootstrap;"
333 " unshift @INC, '" LIBDIR "';" 334 " unshift @INC, '" LIBDIR "';"
334 "}" 335 "}"
335 "" 336 ""
336 "use urxvt;" 337 "use urxvt;"
337 }; 338 };
339 int argc = sizeof (args) / sizeof (args[0]);
340 char **argv = args;
338 341
342 PERL_SYS_INIT3 (&argc, &argv, &environ);
339 perl = perl_alloc (); 343 perl = perl_alloc ();
340 perl_construct (perl); 344 perl_construct (perl);
341 345
342 if (perl_parse (perl, xs_init, 2, argv, (char **)NULL) 346 if (perl_parse (perl, xs_init, argc, argv, (char **)NULL)
343 || perl_run (perl)) 347 || perl_run (perl))
344 { 348 {
345 rxvt_warn ("unable to initialize perl-interpreter, continuing without.\n"); 349 rxvt_warn ("unable to initialize perl-interpreter, continuing without.\n");
346 350
347 perl_destruct (perl); 351 perl_destruct (perl);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines