mirror of
https://github.com/irssi/irssi.git
synced 2026-08-17 15:42:26 +02:00
Irssi::signal_add(), Irssi::timeout_add(), Irssi::input_add() and their
variants now also allow use of code references. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2199 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
9dd46372ff
commit
31dcd8258f
8 changed files with 112 additions and 82 deletions
|
|
@ -74,6 +74,24 @@ char *perl_function_get_package(const char *function)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
SV *perl_func_sv_inc(SV *func, const char *package)
|
||||
{
|
||||
STRLEN n_a;
|
||||
char *name;
|
||||
|
||||
if (SvPOK(func)) {
|
||||
/* prefix with package name */
|
||||
name = g_strdup_printf("%s::%s", package,
|
||||
(char *) SvPV(func, n_a));
|
||||
func = new_pv(name);
|
||||
g_free(name);
|
||||
} else {
|
||||
SvREFCNT_inc(func);
|
||||
}
|
||||
|
||||
return func;
|
||||
}
|
||||
|
||||
SV *irssi_bless_iobject(int type, int chat_type, void *object)
|
||||
{
|
||||
PERL_OBJECT_REC *rec;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue