Skip to content

Commit

Permalink
first commit after moving from LuaForge
Browse files Browse the repository at this point in the history
  • Loading branch information
acd committed Jan 18, 2012
0 parents commit c246df7
Show file tree
Hide file tree
Showing 20 changed files with 13,687 additions and 0 deletions.
11 changes: 11 additions & 0 deletions HISTORY
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
0.1: May 12 2009
* initial release

0.2: November 23 2009
* updated libyaml to version 0.1.3
* now properly dumps and loads strings containing binary data using base64
* dumped strings are quoted when they could be loaded as numbers
* nulls are loaded as yaml.null, a function that returns itself and can
be used to test for equality
* load now also recognizes 'yes' as a boolean truth value
* zero length scalars are not converted to nil
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2009, Andrew Danforth

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
19 changes: 19 additions & 0 deletions LICENSE.LibYAML
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2006 Kirill Simonov

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
34 changes: 34 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Default installation prefix
PREFIX=/usr

# System's libraries directory (where binary libraries are installed)
LUA_LIBDIR=$(PREFIX)/lib/lua/5.1

# System's lua directory (where Lua libraries are installed)
LUA_DIR=$(PREFIX)/share/lua/5.1

LUAINC=$(PREFIX)/include
LUALIB=$(PREFIX)/lib

CC=gcc
# -fexceptions is necessary if your Lua was built with a C++ compiler and
# uses exceptions internally; can be removed
CFLAGS=-O2 -Wall $(INC) -shared -fPIC -fexceptions
LDFLAGS=-shared -L$(LUALIB)
INC=-I$(LUAINC)

OBJS=lyaml.o api.o dumper.o emitter.o loader.o parser.o reader.o scanner.o writer.o b64.o

all: yaml.so

install:
cp -f yaml.so $(LUA_LIBDIR)

uninstall:
rm -f $(LUA_LIBDIR)/yaml.so

yaml.so: $(OBJS)
$(CC) -o $@ $(LDFLAGS) $(OBJS)

clean:
rm -f $(OBJS) yaml.so core core.* a.out
39 changes: 39 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
NAME
yaml - Lua YAML serialization using LibYAML

SYNOPSIS
require 'yaml'

serialized = yaml.dump({ 1, 2, 3, 4 })
content = yaml.load(serialized)

DESCRIPTION
This module is a Lua binding for Kirill Siminov's excellent LibYAML.
LibYAML is generally considered to be the best C YAML 1.1 implementation.
LibYAML 0.1.3 is included as part of this release.

This module defines the functions dump, load, and configure within the
global yaml table.

Portions of this software were inspired by Perl's YAML::LibYAML module by
Ingy d�t Net.

SEE ALSO
* LibYAML (http://pyyaml.org/wiki/LibYAML)
* luayaml: libsyck YAML binding (http://luaforge.net/projects/luayaml)
* YAML::LibYAML (http://search.cpan.org/~nuffin/YAML-LibYAML)

AUTHOR
Andrew Danforth <acd@weirdness.net>

If you are using this module successfully I would love to hear from you.

COPYRIGHT
Copyright (c) 2009, Andrew Danforth

THANKS
Thanks to the following people for suggestions and patches:

Peter Mawhorter
Cyril Romain
Adrian Sampson
29 changes: 29 additions & 0 deletions README.LibYAML
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
LibYAML - A C library for parsing and emitting YAML.

The project is in an early stage of development.

To build and install the library, run:
$ ./configure
$ make
# make install

If you checked the source code from the Subversion repository, run
$ ./bootstrap
$ ./configure
$ make
# make install

For more information, check the LibYAML homepage:
'http://pyyaml.org/wiki/LibYAML'.

Post your questions and opinions to the YAML-Core mailing list:
'http://lists.sourceforge.net/lists/listinfo/yaml-core'.

Submit bug reports and feature requests to the LibYAML bug tracker:
'http://pyyaml.org/newticket?component=libyaml'.

LibYAML is written by Kirill Simonov <xi@resolvent.net>. It is released
under the MIT license. See the file LICENSE for more details.

This project is developed for Python Software Foundation as a part of
Google Summer of Code under the mentorship of Clark Evans.
3 changes: 3 additions & 0 deletions TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* allow creating dump/load objects with internal configuration settings
* better error checking when using LibYAML dump functions
* potentially support additional Lua types (functions?)
Loading

0 comments on commit c246df7

Please sign in to comment.