From 95343e1cf02e97470dc70cd6dde896472be6869f Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Sun, 3 Jan 2010 18:41:14 -0800 Subject: adding more documentation --- ext/psych/parser.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'ext') diff --git a/ext/psych/parser.c b/ext/psych/parser.c index c51f45c..7755c80 100644 --- a/ext/psych/parser.c +++ b/ext/psych/parser.c @@ -194,6 +194,19 @@ static VALUE parse(VALUE self, VALUE yaml) void Init_psych_parser() { cPsychParser = rb_define_class_under(mPsych, "Parser", rb_cObject); + + /* Any encoding: Let the parser choose the encoding */ + rb_define_const(cPsychParser, "ANY", INT2NUM(YAML_ANY_ENCODING)); + + /* UTF-8 Encoding */ + rb_define_const(cPsychParser, "UTF8", INT2NUM(YAML_UTF8_ENCODING)); + + /* UTF-16-LE Encoding with BOM */ + rb_define_const(cPsychParser, "UTF16LE", INT2NUM(YAML_UTF16LE_ENCODING)); + + /* UTF-16-BE Encoding with BOM */ + rb_define_const(cPsychParser, "UTF16BE", INT2NUM(YAML_UTF16BE_ENCODING)); + ePsychSyntaxError = rb_define_class_under(mPsych, "SyntaxError", rb_eSyntaxError); rb_define_method(cPsychParser, "parse", parse, 1); -- cgit v1.2.3