diff options
author | Timo Sirainen <cras@irssi.org> | 2001-06-11 23:54:50 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-06-11 23:54:50 +0000 |
commit | 3a0534da46303e39ecfd307a3d9a8d3dde53958a (patch) | |
tree | 59eab7cfc425a88c3f728adcee290b6089e859fc /src/perl/perl-common.h | |
parent | 3f2b189a4c0abc76065b9038668994f815e1f189 (diff) | |
download | irssi-3a0534da46303e39ecfd307a3d9a8d3dde53958a.zip |
plain objects weren't blessed correctly in lists
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1554 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl/perl-common.h')
-rw-r--r-- | src/perl/perl-common.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/perl/perl-common.h b/src/perl/perl-common.h index e6519681..5489a77d 100644 --- a/src/perl/perl-common.h +++ b/src/perl/perl-common.h @@ -8,9 +8,6 @@ #define new_bless(obj, stash) \ sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(obj))), stash) -#define push_bless(obj, stash) \ - XPUSHs(sv_2mortal(new_bless(obj, stash))) - #define is_hvref(o) \ ((o) && SvROK(o) && SvRV(o) && (SvTYPE(SvRV(o)) == SVt_PVHV)) @@ -35,6 +32,11 @@ char *perl_get_package(void); #define irssi_bless(object) \ ((object) == NULL ? &PL_sv_undef : \ irssi_bless_iobject((object)->type, (object)->chat_type, object)) + +#define plain_bless(object, stash) \ + ((object) == NULL ? &PL_sv_undef : \ + irssi_bless_plain(stash, object)) + SV *irssi_bless_iobject(int type, int chat_type, void *object); SV *irssi_bless_plain(const char *stash, void *object); int irssi_is_ref_object(SV *o); |