mirror of
https://github.com/irssi/irssi.git
synced 2026-08-18 16:12:30 +02:00
plain objects weren't blessed correctly in lists
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1554 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
3f2b189a4c
commit
3a0534da46
8 changed files with 13 additions and 27 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue