diff options
author | Timo Sirainen <cras@irssi.org> | 2001-12-15 23:49:35 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-12-15 23:49:35 +0000 |
commit | 5916b9dcb8c909d97fea5ef6b70c86c625eb3b29 (patch) | |
tree | 79453e0f8de96da77801fd94a2f64cb7d8bd8199 /src/perl | |
parent | 5f271da0a447a52f21516df7dc44603288f87d3c (diff) | |
download | irssi-5916b9dcb8c909d97fea5ef6b70c86c625eb3b29.zip |
Still more version changes .. Irssi::version() now returns the version in
"date.time" format, so now it's also possible to "use Irssi 20011216.0149;".
Also fixed a memory leak for Irssi::parse_special().
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2260 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl')
-rw-r--r-- | src/perl/common/Core.xs | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/perl/common/Core.xs b/src/perl/common/Core.xs index 864eeb3f..80a5edfe 100644 --- a/src/perl/common/Core.xs +++ b/src/perl/common/Core.xs @@ -419,10 +419,12 @@ parse_special(cmd, data="", flags=0) char *cmd char *data int flags -CODE: - RETVAL = parse_special_string(cmd, NULL, NULL, data, NULL, flags); -OUTPUT: - RETVAL +PREINIT: + char *ret; +PPCODE: + ret = parse_special_string(cmd, NULL, NULL, data, NULL, flags); + XPUSHs(sv_2mortal(new_pv(ret))); + g_free_not_null(ret); char * get_irssi_dir() @@ -438,19 +440,16 @@ CODE: OUTPUT: RETVAL -int +char * version() +PREINIT: + char version[100]; CODE: - RETVAL = IRSSI_VERSION_DATE; -OUTPUT: - RETVAL - -int -version_time() -CODE: - RETVAL = IRSSI_VERSION_TIME; + g_snprintf(version, sizeof(version), "%d.%d", + IRSSI_VERSION_DATE, IRSSI_VERSION_TIME); + RETVAL = version; OUTPUT: - RETVAL + RETVAL #******************************* MODULE = Irssi::Core PACKAGE = Irssi::Server |