Acme-ExtUtils-XSOne-Test-Calculator

 view release on metacpan or  search on metacpan

Calculator.xs  view on Meta::CPAN

int
history_count()
CODE:
    RETVAL = history_count;
OUTPUT:
    RETVAL

void
get_history_entry(index)
    int index
PPCODE:
    if (index < 0 || index >= history_count) {
        croak("Invalid history index %d (valid: 0-%d)", index, history_count - 1);
    }
    EXTEND(SP, 4);
    PUSHs(sv_2mortal(newSVpvf("%c", history[index].operation)));
    PUSHs(sv_2mortal(newSVnv(history[index].operand1)));
    PUSHs(sv_2mortal(newSVnv(history[index].operand2)));
    PUSHs(sv_2mortal(newSVnv(history[index].result)));

int

lib/Acme/ExtUtils/XSOne/Test/Calculator/Memory.xs  view on Meta::CPAN

int
history_count()
CODE:
    RETVAL = history_count;
OUTPUT:
    RETVAL

void
get_history_entry(index)
    int index
PPCODE:
    if (index < 0 || index >= history_count) {
        croak("Invalid history index %d (valid: 0-%d)", index, history_count - 1);
    }
    EXTEND(SP, 4);
    PUSHs(sv_2mortal(newSVpvf("%c", history[index].operation)));
    PUSHs(sv_2mortal(newSVnv(history[index].operand1)));
    PUSHs(sv_2mortal(newSVnv(history[index].operand2)));
    PUSHs(sv_2mortal(newSVnv(history[index].result)));

int



( run in 0.954 second using v1.01-cache-2.11-cpan-71847e10f99 )