~ubuntu-branches/ubuntu/karmic/irssi/karmic-updates

« back to all changes in this revision

Viewing changes to debian/patches/12perlembed-fix

  • Committer: Bazaar Package Importer
  • Author(s): Pedro Fragoso
  • Date: 2008-11-05 02:41:00 UTC
  • Revision ID: james.westby@ubuntu.com-20081105024100-6kvi52crw2x5xo57
Tags: 0.8.12-5ubuntu1
* Merge from Debian unstable (LP: #295270), Ubuntu remaining changes:
  - Added debian/patches/90irc-ubuntu-com.dpatch 
  - debian/patches/03firsttimer_text:
    + Adapt it so it tells you about connecting to irc.ubuntu.com and
      joining #ubuntu instead of irc.debian.org and #debian. 
      New with this merge: We now also apply this patch.
  - debian/irssi.perm: Don't remove alternative on upgrades.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Author: Gerfried Fuchs <rhonda@debian.at>       vim:ft=diff:
 
2
Description: Call PERL_SYS_INIT3() and PERL_SYS_TERM() as documented in
 
3
        perlembed(1), BTS #495059
 
4
 
 
5
Index: irssi-0.8.12/src/perl/perl-core.c
 
6
===================================================================
 
7
--- irssi-0.8.12.orig/src/perl/perl-core.c
 
8
+++ irssi-0.8.12/src/perl/perl-core.c
 
9
@@ -118,16 +118,18 @@ static void xs_init(pTHX)
 
10
 void perl_scripts_init(void)
 
11
 {
 
12
        char *args[] = {"", "-e", "0"};
 
13
+       int argc = 3;
 
14
        char *code, *use_code;
 
15
 
 
16
        perl_scripts = NULL;
 
17
         perl_sources_start();
 
18
        perl_signals_start();
 
19
 
 
20
+       PERL_SYS_INIT3(&argc, &args, &environ);
 
21
        my_perl = perl_alloc();
 
22
        perl_construct(my_perl);
 
23
 
 
24
-       perl_parse(my_perl, xs_init, 3, args, NULL);
 
25
+       perl_parse(my_perl, xs_init, argc, args, NULL);
 
26
 #if PERL_STATIC_LIBS == 1
 
27
        perl_eval_pv("Irssi::Core::boot_Irssi_Core();", TRUE);
 
28
 #endif
 
29
@@ -170,6 +172,7 @@ void perl_scripts_deinit(void)
 
30
        /* perl interpreter */
 
31
        perl_destruct(my_perl);
 
32
        perl_free(my_perl);
 
33
+       PERL_SYS_TERM();
 
34
        my_perl = NULL;
 
35
 }
 
36