diff options
Diffstat (limited to 'src/perl/ui/Formats.xs')
-rw-r--r-- | src/perl/ui/Formats.xs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/perl/ui/Formats.xs b/src/perl/ui/Formats.xs new file mode 100644 index 00000000..84368d78 --- /dev/null +++ b/src/perl/ui/Formats.xs @@ -0,0 +1,28 @@ +#include "module.h" + +MODULE = Irssi::UI::Formats PACKAGE = Irssi::UI::Window +PROTOTYPES: ENABLE + +void +format_get_text(window, module, server, target, formatnum, ...) + Irssi::UI::Window window + char *module + Irssi::Server server + char *target + int formatnum +PREINIT: + char **charargs; + char *ret; + int n; + STRLEN n_a; +PPCODE: + charargs = g_new0(char *, items-5+1); + charargs[items-5] = NULL; + for (n = 5; n < items; n++) { + charargs[n-5] = (char *)SvPV(ST(n), n_a); + } + ret = format_get_text(module, window, server, target, formatnum, charargs); + g_free(charargs); + + XPUSHs(sv_2mortal(new_pv(ret))); + g_free_not_null(ret); |