mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05: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
@ -310,11 +310,9 @@ void
|
|||||||
commands()
|
commands()
|
||||||
PREINIT:
|
PREINIT:
|
||||||
GSList *tmp;
|
GSList *tmp;
|
||||||
HV *stash;
|
|
||||||
PPCODE:
|
PPCODE:
|
||||||
stash = gv_stashpv("Irssi::Command", 0);
|
|
||||||
for (tmp = commands; tmp != NULL; tmp = tmp->next) {
|
for (tmp = commands; tmp != NULL; tmp = tmp->next) {
|
||||||
push_bless(tmp->data, stash);
|
XPUSHs(sv_2mortal(plain_bless(tmp->data, "Irssi::Command")));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -4,11 +4,9 @@ void
|
|||||||
ignores()
|
ignores()
|
||||||
PREINIT:
|
PREINIT:
|
||||||
GSList *tmp;
|
GSList *tmp;
|
||||||
HV *stash;
|
|
||||||
PPCODE:
|
PPCODE:
|
||||||
stash = gv_stashpv("Irssi::Ignore", 0);
|
|
||||||
for (tmp = servers; tmp != NULL; tmp = tmp->next) {
|
for (tmp = servers; tmp != NULL; tmp = tmp->next) {
|
||||||
push_bless(tmp->data, stash);
|
XPUSHs(sv_2mortal(plain_bless(tmp->data, "Irssi::Ignore")));
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -4,11 +4,9 @@ void
|
|||||||
logs()
|
logs()
|
||||||
PREINIT:
|
PREINIT:
|
||||||
GSList *tmp;
|
GSList *tmp;
|
||||||
HV *stash;
|
|
||||||
PPCODE:
|
PPCODE:
|
||||||
stash = gv_stashpv("Irssi::Log", 0);
|
|
||||||
for (tmp = logs; tmp != NULL; tmp = tmp->next) {
|
for (tmp = logs; tmp != NULL; tmp = tmp->next) {
|
||||||
push_bless(tmp->data, stash);
|
XPUSHs(sv_2mortal(plain_bless(tmp->data, "Irssi::Log")));
|
||||||
}
|
}
|
||||||
|
|
||||||
Irssi::Log
|
Irssi::Log
|
||||||
|
@ -13,11 +13,9 @@ void
|
|||||||
reconnects()
|
reconnects()
|
||||||
PREINIT:
|
PREINIT:
|
||||||
GSList *tmp;
|
GSList *tmp;
|
||||||
HV *stash;
|
|
||||||
PPCODE:
|
PPCODE:
|
||||||
stash = gv_stashpv("Irssi::Reconnect", 0);
|
|
||||||
for (tmp = reconnects; tmp != NULL; tmp = tmp->next) {
|
for (tmp = reconnects; tmp != NULL; tmp = tmp->next) {
|
||||||
push_bless(tmp->data, stash);
|
XPUSHs(sv_2mortal(plain_bless(tmp->data, "Irssi::Reconnect")));
|
||||||
}
|
}
|
||||||
|
|
||||||
Irssi::Connect
|
Irssi::Connect
|
||||||
|
@ -4,11 +4,9 @@ void
|
|||||||
windows()
|
windows()
|
||||||
PREINIT:
|
PREINIT:
|
||||||
GSList *tmp;
|
GSList *tmp;
|
||||||
HV *stash;
|
|
||||||
PPCODE:
|
PPCODE:
|
||||||
stash = gv_stashpv("Irssi::Window", 0);
|
|
||||||
for (tmp = windows; tmp != NULL; tmp = tmp->next) {
|
for (tmp = windows; tmp != NULL; tmp = tmp->next) {
|
||||||
push_bless(tmp->data, stash);
|
XPUSHs(sv_2mortal(plain_bless(tmp->data, "Irssi::Window")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,11 +5,9 @@ bans(channel)
|
|||||||
Irssi::Irc::Channel channel
|
Irssi::Irc::Channel channel
|
||||||
PREINIT:
|
PREINIT:
|
||||||
GSList *tmp;
|
GSList *tmp;
|
||||||
HV *stash;
|
|
||||||
PPCODE:
|
PPCODE:
|
||||||
stash = gv_stashpv("Irssi::Irc::Ban", 0);
|
|
||||||
for (tmp = channel->banlist; tmp != NULL; tmp = tmp->next) {
|
for (tmp = channel->banlist; tmp != NULL; tmp = tmp->next) {
|
||||||
push_bless(tmp->data, stash);
|
XPUSHs(sv_2mortal(plain_bless(tmp->data, "Irssi::Irc::Ban")));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -17,11 +15,9 @@ ebans(channel)
|
|||||||
Irssi::Irc::Channel channel
|
Irssi::Irc::Channel channel
|
||||||
PREINIT:
|
PREINIT:
|
||||||
GSList *tmp;
|
GSList *tmp;
|
||||||
HV *stash;
|
|
||||||
PPCODE:
|
PPCODE:
|
||||||
stash = gv_stashpv("Irssi::Irc::Ban", 0);
|
|
||||||
for (tmp = channel->ebanlist; tmp != NULL; tmp = tmp->next) {
|
for (tmp = channel->ebanlist; tmp != NULL; tmp = tmp->next) {
|
||||||
push_bless(tmp->data, stash);
|
XPUSHs(sv_2mortal(plain_bless(tmp->data, "Irssi::Irc::Ban")));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -4,11 +4,9 @@ void
|
|||||||
notifies()
|
notifies()
|
||||||
PREINIT:
|
PREINIT:
|
||||||
GSList *tmp;
|
GSList *tmp;
|
||||||
HV *stash;
|
|
||||||
PPCODE:
|
PPCODE:
|
||||||
stash = gv_stashpv("Irssi::Irc::Notifylist", 0);
|
|
||||||
for (tmp = notifies; tmp != NULL; tmp = tmp->next) {
|
for (tmp = notifies; tmp != NULL; tmp = tmp->next) {
|
||||||
push_bless(tmp->data, stash);
|
XPUSHs(sv_2mortal(plain_bless(tmp->data, "Irssi::Irc::Notifylist")));
|
||||||
}
|
}
|
||||||
|
|
||||||
Irssi::Irc::Notifylist
|
Irssi::Irc::Notifylist
|
||||||
|
@ -8,9 +8,6 @@
|
|||||||
#define new_bless(obj, stash) \
|
#define new_bless(obj, stash) \
|
||||||
sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(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) \
|
#define is_hvref(o) \
|
||||||
((o) && SvROK(o) && SvRV(o) && (SvTYPE(SvRV(o)) == SVt_PVHV))
|
((o) && SvROK(o) && SvRV(o) && (SvTYPE(SvRV(o)) == SVt_PVHV))
|
||||||
|
|
||||||
@ -35,6 +32,11 @@ char *perl_get_package(void);
|
|||||||
#define irssi_bless(object) \
|
#define irssi_bless(object) \
|
||||||
((object) == NULL ? &PL_sv_undef : \
|
((object) == NULL ? &PL_sv_undef : \
|
||||||
irssi_bless_iobject((object)->type, (object)->chat_type, object))
|
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_iobject(int type, int chat_type, void *object);
|
||||||
SV *irssi_bless_plain(const char *stash, void *object);
|
SV *irssi_bless_plain(const char *stash, void *object);
|
||||||
int irssi_is_ref_object(SV *o);
|
int irssi_is_ref_object(SV *o);
|
||||||
|
Loading…
Reference in New Issue
Block a user