diff options
author | Timo Sirainen <cras@irssi.org> | 2000-10-01 20:48:48 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-10-01 20:48:48 +0000 |
commit | 62dee8fdafe558b638cfc1995841e3ca7e007368 (patch) | |
tree | ce328ef6fb25a689b0364743a9f3c59405302b9e /src/perl/perl-common.h | |
parent | c1a191955ba9903e1dc07b49886a9ce52fdf4207 (diff) | |
download | irssi-62dee8fdafe558b638cfc1995841e3ca7e007368.zip |
Perl works again :) Split to Irssi and Irssi::Irc packages.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@705 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl/perl-common.h')
-rw-r--r-- | src/perl/perl-common.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/perl/perl-common.h b/src/perl/perl-common.h new file mode 100644 index 00000000..c5eb9748 --- /dev/null +++ b/src/perl/perl-common.h @@ -0,0 +1,21 @@ +#ifndef __PERL_COMMON_H +#define __PERL_COMMON_H + +#define new_pv(a) \ + (newSVpv((a) == NULL ? "" : (a), (a) == NULL ? 0 : strlen(a))) + +extern GHashTable *perl_stashes; + +HV *irssi_get_stash_item(int type, int chat_type); + +#define irssi_get_stash(item) \ + irssi_get_stash_item((item)->type, (item)->chat_type) + +#define irssi_add_stash(type, chat_type, stash) \ + g_hash_table_insert(perl_stashes, GINT_TO_POINTER(type | \ + (chat_type << 24)), g_strdup(stash)) + +void perl_common_init(void); +void perl_common_deinit(void); + +#endif |