summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-01-03 18:41:14 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2010-01-03 18:41:14 -0800
commit95343e1cf02e97470dc70cd6dde896472be6869f (patch)
treec2dbff35786430f95472f9cc3de68edeca2e5fe1 /ext
parente600d76dc320fa48497dcd11f56a7999a70f1410 (diff)
downloadpsych-95343e1cf02e97470dc70cd6dde896472be6869f.zip
adding more documentation
Diffstat (limited to 'ext')
-rw-r--r--ext/psych/parser.c13
1 files changed, 13 insertions, 0 deletions
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);