ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/JSON-XS/XS.xs
(Generate patch)

Comparing JSON-XS/XS.xs (file contents):
Revision 1.65 by root, Sat Oct 13 01:55:31 2007 UTC vs.
Revision 1.66 by root, Sun Nov 25 19:02:42 2007 UTC

1485 self->flags &= ~ix; 1485 self->flags &= ~ix;
1486 1486
1487 XPUSHs (ST (0)); 1487 XPUSHs (ST (0));
1488} 1488}
1489 1489
1490void get_ascii (JSON *self)
1491 ALIAS:
1492 get_ascii = F_ASCII
1493 get_latin1 = F_LATIN1
1494 get_utf8 = F_UTF8
1495 get_indent = F_INDENT
1496 get_canonical = F_CANONICAL
1497 get_space_before = F_SPACE_BEFORE
1498 get_space_after = F_SPACE_AFTER
1499 get_pretty = F_PRETTY
1500 get_allow_nonref = F_ALLOW_NONREF
1501 get_shrink = F_SHRINK
1502 get_allow_blessed = F_ALLOW_BLESSED
1503 get_convert_blessed = F_CONV_BLESSED
1504 get_relaxed = F_RELAXED
1505 PPCODE:
1506 XPUSHs (boolSV (self->flags & ix));
1507
1490void max_depth (JSON *self, UV max_depth = 0x80000000UL) 1508void max_depth (JSON *self, UV max_depth = 0x80000000UL)
1491 PPCODE: 1509 PPCODE:
1492{ 1510{
1493 UV log2 = 0; 1511 UV log2 = 0;
1494 1512
1500 self->flags = self->flags & ~F_MAXDEPTH | (log2 << S_MAXDEPTH); 1518 self->flags = self->flags & ~F_MAXDEPTH | (log2 << S_MAXDEPTH);
1501 1519
1502 XPUSHs (ST (0)); 1520 XPUSHs (ST (0));
1503} 1521}
1504 1522
1523int get_max_depth (JSON *self)
1524 CODE:
1525 RETVAL = DEC_DEPTH (self->flags);
1526 OUTPUT:
1527 RETVAL
1528
1505void max_size (JSON *self, UV max_size = 0) 1529void max_size (JSON *self, UV max_size = 0)
1506 PPCODE: 1530 PPCODE:
1507{ 1531{
1508 UV log2 = 0; 1532 UV log2 = 0;
1509 1533
1515 1539
1516 self->flags = self->flags & ~F_MAXSIZE | (log2 << S_MAXSIZE); 1540 self->flags = self->flags & ~F_MAXSIZE | (log2 << S_MAXSIZE);
1517 1541
1518 XPUSHs (ST (0)); 1542 XPUSHs (ST (0));
1519} 1543}
1544
1545int get_max_size (JSON *self)
1546 CODE:
1547 RETVAL = DEC_SIZE (self->flags);
1548 OUTPUT:
1549 RETVAL
1520 1550
1521void filter_json_object (JSON *self, SV *cb = &PL_sv_undef) 1551void filter_json_object (JSON *self, SV *cb = &PL_sv_undef)
1522 PPCODE: 1552 PPCODE:
1523{ 1553{
1524 SvREFCNT_dec (self->cb_object); 1554 SvREFCNT_dec (self->cb_object);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines