1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

fixed memory leaks with several functions.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2789 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-05-13 17:57:19 +00:00 committed by cras
parent d68bbeb5ef
commit 2adba92338
5 changed files with 43 additions and 7 deletions

View File

@ -445,9 +445,15 @@ int
level2bits(str)
char *str
char *
void
bits2level(bits)
int bits
PREINIT:
char *ret;
PPCODE:
ret = bits2level(bits);
xPUSHs(sv_2mortal(new_pv(ret)));
g_free(ret);
int
combine_level(level, str)
@ -513,7 +519,7 @@ void
pidwait_remove(pid)
int pid
char *
void
parse_special(cmd, data="", flags=0)
char *cmd
char *data

View File

@ -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_

View File

@ -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)

View File

@ -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)

View File

@ -26,9 +26,15 @@ format_real_length(str, len)
char *str
int len
char *
void
strip_codes(input)
char *input
PREINIT:
char *ret;
PPCODE:
ret = strip_codes(input);
xPUSHs(sv_2mortal(new_pv(ret)));
g_free(ret);
void
format_get_text(window, module, server, target, formatnum, ...)