irssi/src/perl/textui/TextBuffer.xs
David Leadbeater 43df6e424e Define PERL_NO_GET_CONTEXT in all perl source files
This removes the calls to Perl_get_context() that get automatically
added to XS code for ancient source code compatibility reasons.

The result is about a ~60K size reduction in the binary (based on
comparing two 64-bit stripped irssi binaries compiled
--with-perl-staticlib).
2014-06-24 20:20:27 +01:00

41 lines
804 B
Plaintext

#define PERL_NO_GET_CONTEXT
#include "module.h"
MODULE = Irssi::TextUI::TextBuffer PACKAGE = Irssi
PROTOTYPES: ENABLE
#*******************************
MODULE = Irssi::TextUI::TextBuffer PACKAGE = Irssi::TextUI::Line PREFIX = textbuffer_line_
#*******************************
Irssi::TextUI::Line
textbuffer_line_prev(line)
Irssi::TextUI::Line line
CODE:
RETVAL = line->prev;
OUTPUT:
RETVAL
Irssi::TextUI::Line
textbuffer_line_next(line)
Irssi::TextUI::Line line
CODE:
RETVAL = line->next;
OUTPUT:
RETVAL
void
textbuffer_line_get_text(line, coloring)
Irssi::TextUI::Line line
int coloring
PREINIT:
GString *str;
SV *result;
PPCODE:
str = g_string_new(NULL);
textbuffer_line2text(line, coloring, str);
result = new_pv(str->str);
XPUSHs(sv_2mortal(result));
g_string_free(str, TRUE);