diff options
author | Timo Sirainen <cras@irssi.org> | 2002-05-13 17:57:19 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-05-13 17:57:19 +0000 |
commit | 2adba92338ce4acc6c52300ba76907686ec42284 (patch) | |
tree | afcaa2fd122e063ac8f0409d1bf1c4ba7731e600 /src/perl/irc | |
parent | d68bbeb5efc0ecefe9e86ce4323661c5c282cee4 (diff) | |
download | irssi-2adba92338ce4acc6c52300ba76907686ec42284.zip |
fixed memory leaks with several functions.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2789 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl/irc')
-rw-r--r-- | src/perl/irc/Dcc.xs | 8 | ||||
-rw-r--r-- | src/perl/irc/Modes.xs | 16 | ||||
-rw-r--r-- | src/perl/irc/Server.xs | 8 |
3 files changed, 28 insertions, 4 deletions
diff --git a/src/perl/irc/Dcc.xs b/src/perl/irc/Dcc.xs index 657783a7..8c906a19 100644 --- a/src/perl/irc/Dcc.xs +++ b/src/perl/irc/Dcc.xs @@ -58,9 +58,15 @@ dcc_ctcp_message(server, target, chat, notice, msg) int notice char *msg -char * +void dcc_get_download_path(fname) char *fname +PREINIT: + char *ret; +PPCODE: + ret = dcc_get_download_path(fname); + xPUSHs(sv_2mortal(new_pv(ret))); + g_free(ret); #******************************* MODULE = Irssi::Irc::Dcc PACKAGE = Irssi::Irc::Dcc PREFIX = dcc_ diff --git a/src/perl/irc/Modes.xs b/src/perl/irc/Modes.xs index 5dcb3389..723930fb 100644 --- a/src/perl/irc/Modes.xs +++ b/src/perl/irc/Modes.xs @@ -3,21 +3,33 @@ MODULE = Irssi::Irc::Modes PACKAGE = Irssi::Irc PROTOTYPES: ENABLE -char * +void modes_join(old, mode, channel) char *old char *mode int channel +PREINIT: + char *ret; +PPCODE: + ret = modes_join(old, mode, channel); + xPUSHs(sv_2mortal(new_pv(ret))); + g_free(ret); #******************************* MODULE = Irssi::Irc::Modes PACKAGE = Irssi::Irc::Channel PREFIX = channel_ #******************************* -char * +void ban_get_mask(channel, nick, ban_type) Irssi::Irc::Channel channel char *nick int ban_type +PREINIT: + char *ret; +PPCODE: + ret = ban_get_mask(channel, nick, ban_type); + xPUSHs(sv_2mortal(new_pv(ret))); + g_free(ret); Irssi::Irc::Ban banlist_add(channel, ban, nick, time) diff --git a/src/perl/irc/Server.xs b/src/perl/irc/Server.xs index 0cbcad8e..dfe88f65 100644 --- a/src/perl/irc/Server.xs +++ b/src/perl/irc/Server.xs @@ -45,9 +45,15 @@ static GSList *event_hash2list(HV *hv) MODULE = Irssi::Irc::Server PACKAGE = Irssi::Irc::Server PREFIX = irc_server_ PROTOTYPES: ENABLE -char * +void irc_server_get_channels(server) Irssi::Irc::Server server +PREINIT: + char *ret; +PPCODE: + ret = irc_server_get_channels(server); + xPUSHs(sv_2mortal(new_pv(ret))); + g_free(ret); void send_raw(server, cmd) |