summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-12-03 22:37:02 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-12-03 22:37:02 +0000
commit439818bcf868daaf4c22d77469f830cb9a496e8b (patch)
tree17f89c4aa8fd15cedbf8be04dd953561975521ee /src
parent3c2aec1214c9d4ab572217e460bdc9f6dce21f4a (diff)
downloadirssi-439818bcf868daaf4c22d77469f830cb9a496e8b.zip
Made irssi_binary global and exported to perl as get_irssi_binary().
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3039 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/core/session.c5
-rw-r--r--src/core/session.h2
-rw-r--r--src/perl/common/Core.xs8
3 files changed, 13 insertions, 2 deletions
diff --git a/src/core/session.c b/src/core/session.c
index 004cd4f7..e07fc379 100644
--- a/src/core/session.c
+++ b/src/core/session.c
@@ -33,7 +33,7 @@
#include "nicklist.h"
static char *session_file;
-static char *irssi_binary;
+char *irssi_binary;
static char **session_args;
@@ -354,7 +354,8 @@ void session_init(void)
{ NULL, '\0', 0, NULL }
};
- session_file = NULL;
+ session_file = NULL;
+ irssi_binary = NULL;
args_register(options);
command_bind("upgrade", NULL, (SIGNAL_FUNC) cmd_upgrade);
diff --git a/src/core/session.h b/src/core/session.h
index 5788b5f0..000ec56e 100644
--- a/src/core/session.h
+++ b/src/core/session.h
@@ -1,6 +1,8 @@
#ifndef __SESSION_H
#define __SESSION_H
+extern char *irssi_binary;
+
void session_set_binary(const char *path);
void session_upgrade(void);
diff --git a/src/perl/common/Core.xs b/src/perl/common/Core.xs
index d5b9d6e8..8230e77f 100644
--- a/src/perl/common/Core.xs
+++ b/src/perl/common/Core.xs
@@ -3,6 +3,7 @@
#include "core.h"
#include "pidwait.h"
+#include "session.h"
#define DEFAULT_COMMAND_CATEGORY "Perl scripts' commands"
@@ -549,6 +550,13 @@ OUTPUT:
RETVAL
char *
+get_irssi_binary()
+CODE:
+ RETVAL = irssi_binary;
+OUTPUT:
+ RETVAL
+
+char *
version()
PREINIT:
char version[100];