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

Fixed and extended #43

Closed
wants to merge 19 commits into from
Closed

Fixed and extended #43

wants to merge 19 commits into from

Conversation

rurban
Copy link

@rurban rurban commented Feb 27, 2016

  • fixed tests to be able to run under PERL_CORE=1
    *.c fixes from Fixed most compiler warnings -Wall -Wextra yaml/libyaml#7
    and some added perl_libyaml.c fixes
  • avoid duplicate LibYAML.o which is fatal with -m32
  • extended to add some performance improvements and features:
    • native LoadFile, DumpFile accepting IO, magic strings or fileglob argument types
      support filename in error messages.
    • 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)
    • Change default for YAML backcompat IndentlessMap=0.
      YAML is now able to read YAML::XS written files,
      and YAML::XS written files have now the same map indent as all other YAML writers.
    • enable 2 more test/glob.t tests
    • fix dump_yaml in test/TestYAMLTests.pm

The new optional NotStrict loader option added also

The relevant libyaml changes are in yaml/libyaml#8

Work on core integration. Shipped with cperl under
cpan/Yaml-LibYAML with stricter C warnings and no blib.
Reini Urban added 3 commits March 4, 2016 23:37
from yaml/libyaml#7
and some added perl_libyaml.c fixes
which is fatal with -m32
Change the default indent behavior of map elements,
advance the indent the children of the map
according to the spec: 6.1 Indentation Spaces:

  "Each node must be indented further than its parent node.  All sibling nodes
  must use the exact same indentation level.  However the content of each
  sibling node may be further indented independently."
  http://yaml.org/spec/1.2/spec.html#id2777534

and make it readable by YAML,
and behave the same as all other YAML writers.

Fallback to the old YAML::XS map indent by setting the global
$YAML::XS::IndentlessMap to a true value.

Fixes RT #41463 and starts making it usable as default YAML library for core.
Add native DumpFile, LoadFile
  support filename in error messages.
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

upstream:
add problem_nonstrict to parser
add DEBUG macros to emitter.c, fix some indentations
@rurban rurban force-pushed the cperl-core branch 2 times, most recently from ff72acd to 60d94db Compare March 5, 2016 19:30
Reini Urban added 2 commits March 5, 2016 20:37
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)

LoadFile is now XS only

bump the libyaml library version to 0.1.7
@rurban rurban changed the title Fixed most compiler warnings -Wall -Wextra Fixed and extended Mar 7, 2016
Reini Urban added 2 commits March 7, 2016 13:23
Accept IO, magic strings or fileglob argument types for (Load|Dump)File
All test pass.
@mgruner
Copy link

mgruner commented Mar 8, 2016

👍

put goto and return into extra lines, to
be able to set breakpoints.
fix a couple of extreme compiler warnings
i.e. clang -Weverything. shadowing variable names,
unused code.
rurban pushed a commit to perl11/cperl that referenced this pull request Mar 18, 2016
Reini Urban added 5 commits March 23, 2016 16:05
Perl CPAN silently allows any unknown escape chars to pass them to
regexp. Mimic that in nonstrict mode. Add a cpan test.
we cannot malloc to an anon struct in C++.
    typedef yaml_anchors_t

Improve Makefile.PL for duplicate LibYAML.c
avoid duplicate checks against NULL
Update Changes
@rurban
Copy link
Author

rurban commented Oct 15, 2016

See PR #50 cperl 0.74 instead

@rurban rurban closed this Oct 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants