Changeset 1740

Show
Ignore:
Timestamp:
01/11/06 20:13:53
Author:
miyagawa
Message:

apply audrey's patch

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • JSON-Syck/trunk/Changes

    r1725 r1740  
    1 [Changes for 0.17 - 2006-01-11] 
    2  
    3 * Use the correct style for dual vars and tied scalars. 
    4   Reported by: Tatsuhiko Miyagawa 
    5  
    6 [Changes for 0.16 - 2006-01-11] 
    7  
    810.01 
    92        * Initial release, copied from Audrey Tang's YAML-Syck distro 
  • JSON-Syck/trunk/Makefile.PL

    r1715 r1740  
    11use strict; 
    2 use inc::Module::Install 0.48; 
     2use lib '.'; 
     3use inc::Module::Install; 
    34 
    45name        'JSON-Syck'; 
  • JSON-Syck/trunk/emitter.c

    r1705 r1740  
    759759    for( i = 0; i < len; i++ ) 
    760760    { 
    761         if( (src[i] < 0x20) || (0x7E < src[i]) ) 
     761        if( (src[i] < 0x20) ) // || (0x7E < src[i]) ) 
    762762        { 
    763763            syck_emitter_write( e, "\\", 1 ); 
  • JSON-Syck/trunk/lib/JSON/Syck.pm

    r1725 r1740  
    4242I<JSON::Syck>. 
    4343 
    44 While JSON is a pure-perl module and JSON::Syck is based on libsyck, 
     44Since JSON is a pure-perl module and JSON::Syck is based on libsyck, 
    4545JSON::Syck is supposed to be very fast and memory efficient. See 
    46 chansen's benchmark table at L<http://rafb.net/paste/results/8rSJGq74.txt>. 
     46chansen's benchmark table at 
     47L<http://idisk.mac.com/christian.hansen/Public/perl/serialize.pl> 
    4748 
    4849JSON.pm comes with dozens of ways to do the same thing and lots of 
    49 options, while JSON::Syck doesn't. There's only C<Load> and C<Dump> 
     50options, while JSON::Syck doesn't. There's only C<Load> and C<Dump>. 
    5051 
    5152Oh, and JSON::Syck doesn't use camelCase method names :-) 
     
    6465details. 
    6566 
    66 The F<Storable.xs> code bundled with this library is written by 
    67 Raphael Manfredi and maintained by perl5-porters, under the same 
    68 license as Perl. 
    69  
    7067This program is free software; you can redistribute it and/or modify 
    7168it under the same terms as Perl itself. 
  • JSON-Syck/trunk/perl_syck.h

    r1725 r1740  
    22#include "perl.h" 
    33#include "XSUB.h" 
     4 
     5#define NEED_grok_oct 
     6#define NEED_grok_hex 
     7#define NEED_grok_number 
     8#define NEED_grok_numeric_radix 
     9#define NEED_newRV_noinc 
    410#include "ppport.h" 
    511#include "ppport_math.h" 
     
    202208    STRLEN len = strlen(s); 
    203209 
    204     Newz(2006, out, len*2+1, char); 
     210    New(2006, out, len*2+1, char); 
    205211    pos = out; 
    206212 
     
    276282    syck_lookup_sym(parser, v, (char **)&obj); 
    277283    syck_free_parser(parser); 
     284 
     285#ifdef YAML_IS_JSON 
     286    Safefree(s); 
     287#endif 
     288 
    278289    return obj; 
    279290} 
     
    426437    bonus = emitter->bonus = S_ALLOC_N(struct emitter_xtra, 1); 
    427438    bonus->port = out; 
    428     Newz(801, bonus->tag, 512, char); 
     439    New(801, bonus->tag, 512, char); 
    429440 
    430441    syck_emitter_handler( emitter, perl_syck_emitter_handler );