Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cperl 0.74 #50

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
.gitignore
LibYAML/.gdbinit
LibYAML/.gdbinit~
LibYAML/LibYAML.bs
LibYAML/LibYAML.c
LibYAML/LibYAML.o
LibYAML/MYMETA.json
LibYAML/MYMETA.yml
LibYAML/Makefile
LibYAML/Makefile~
LibYAML/TAGS
LibYAML/api.o
LibYAML/blib/
LibYAML/dumper.o
LibYAML/emitter.c~
LibYAML/emitter.o
LibYAML/loader.o
LibYAML/parser.o
LibYAML/perl_libyaml.c~
LibYAML/perl_libyaml.o
LibYAML/pm_to_blib
LibYAML/reader.o
LibYAML/scanner.o
LibYAML/writer.o
LibYAML/x.yml
blib
cpan/
doc/YAML/XS.swim~
lib/YAML/XS.pod
lib/YAML/XS.pod~
t
test.sh
test.sh~
test/blessed.t~
test/output/
log.test-*
npm-debug.log
test/dump-io-file-*.yaml
pm_to_blib
.gdbinit
LibYAML/Makefile.PL~
MYMETA.json
MYMETA.yml
Makefile
Makefile.PL
Makefile.old
YAML-LibYAML-*.tar.gz
inc/
lib/YAML/LibYAML.pod
54 changes: 54 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,4 +1,58 @@
---
version: 0.74
date: Fri Oct 14 22:33:08 2016 rurban
changes:
- fixed encoding issues: fixed wrong $YAML::XS::Encoding and
$YAML::XS::LineBreak comparison logic.
- fixed utf8 input as handled as UTF8,
non-utf8 honors $YAML::XS::Encoding.
---
version: 0.73
date: Tue Sep 13 16:34:59 2016 rurban
changes:
- fix libyaml clang -Wlogical-not-parentheses warnings
---
version: 0.72
date: Tue Sep 13 15:37:56 2016 rurban
changes:
- fix libyaml clang -Wlogical-op warnings
- add missing Test::base prereq
- fix XS.pod syntax error
---
version: 0.71 rurban
date: Thu Sep 8 10:39:25 2016
changes:
- avoid duplicate checks against NULL
- merge with libyaml 0.1.7 upstream
---
version: 0.70 rurban
date: Mon May 9 17:38:54 2016
changes:
- cperl fixes for fake_signatures
- libyaml fix C++-compat errors
- improve Makefile for win32
- improve ppport_sort.h
- implement new NonStrict mode (for perl5 compat)
- libyaml reformat, minor optimizations, fix warnings
- Update documentation
- Use error codes, return undef on error.
- abstract the loader functionality to load_impl(),
dump_impl() not yet.
- rearrange static funcs (not decl in header)
- DumpFile,LoadFile is now XS only, and do accept mg pv,
io objects and fileglobs. support filename in error messages.
- support $YAML::XS::NonStrict loader
- Add dumper options Indent, BestWidth, Canonical, Unicode,
Encoding, LineBreak, OpenEnded (kept defaults)
- Add loader option NonStrict, Encoding (kept defaults)
- Fix default emitter_set_width (2 => 80)
- Fix the tests for the new default IndentlessMap=0
and check also IndentlessMap=1
- enable 2 more test/glob.t tests
- fix dump_yaml in test/TestYAMLTests.pm
- libyaml: add problem_nonstrict to parser
- libyaml: add DEBUG macros to emitter.c, fix some indentations
---
version: 0.63
date: Fri Jul 8 14:40:35 UTC 2016
changes:
Expand Down
41 changes: 32 additions & 9 deletions LibYAML/LibYAML.xs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <perl_libyaml.h>

/* XXX Make -Wall not complain about 'local_patches' not being used. */
#if !defined(PERL_PATCHLEVEL_H_IMPLICIT)
void xxx_local_patches_xs() { printf("%s", local_patches[0]); }
Expand All @@ -9,18 +10,40 @@ MODULE = YAML::XS::LibYAML PACKAGE = YAML::XS::LibYAML
PROTOTYPES: DISABLE

void
Load (yaml_sv)
SV *yaml_sv
PPCODE:
Load (yaml_string)
SV *yaml_string
PPCODE:
PL_markstack_ptr++;
if (!Load(yaml_string))
XSRETURN_UNDEF;
else
return;

void
LoadFile (yaml_file)
SV *yaml_file
PPCODE:
PL_markstack_ptr++;
Load(yaml_sv);
return;
if (!LoadFile(yaml_file))
XSRETURN_UNDEF;
else
return;

void
Dump (...)
PPCODE:
SV *dummy = NULL;
PPCODE:
PL_markstack_ptr++;
Dump(dummy);
return;
if (!Dump())
XSRETURN_UNDEF;
else
return;

void
DumpFile (yaml_file, ...)
SV *yaml_file
PPCODE:
PL_markstack_ptr++;
if (!DumpFile(yaml_file))
XSRETURN_UNDEF;
else
XSRETURN_YES;
22 changes: 17 additions & 5 deletions LibYAML/Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,38 @@ if (-d '../.git') {
or die "update.sh failed";
}

my @c_files = glob("*.c");
if (!@c_files and $^O eq 'MSWin32') { # win32 miniperl has no glob
@c_files = qw(api.c dumper.c emitter.c loader.c parser.c perl_libyaml.c
reader.c scanner.c writer.c LibYAML.c);
}
unless (grep { /^LibYAML\.c$/i } @c_files) { # skip duplicate
push @c_files, 'LibYAML.c';
}
my $o = $Config{_o};
my $obj_files = join ' ', map {
my $c = $_;
$c =~ s/\.c$/$Config::Config{_o}/;
$c =~ s/\.c$/$o/;
$c;
} glob("*.c"), 'LibYAML.c';
} @c_files;

my $DEFINE = $^O eq 'MSWin32'
? '-DHAVE_CONFIG_H -DYAML_DECLARE_EXPORT'
: '-DHAVE_CONFIG_H';
? '-DHAVE_CONFIG_H -DYAML_DECLARE_EXPORT'
: '-DHAVE_CONFIG_H';

WriteMakefile(
NAME => 'YAML::XS::LibYAML',
PREREQ_PM => {},
PREREQ_PM => { 'Test::Base' => 0.88 },
# CCFLAGS => '-ansi -pedantic -Wall',
# CCFLAGS => '-ansi -Wall',
# CCFLAGS => '-pedantic -Wall',
# CCFLAGS => '-Wall',
DEFINE => $DEFINE,
#FUNCLIST => [qw(Dump Load DumpFile LoadFile)],
LIBS => [''], # e.g., '-lm'
INC => '-I.',
OBJECT => $obj_files,
ABSTRACT_FROM => 'lib/YAML/XS/LibYAML.pm',
VERSION_FROM => -f '../lib/YAML/XS.pm' ? '../lib/YAML/XS.pm' : 'lib/YAML/XS/LibYAML.pm',
AUTHOR => 'Ingy döt Net <[email protected]>',
);
Loading