~valide/valide/dev

« back to all changes in this revision

Viewing changes to libvalide/libyaml-glib/src/writer.vala

  • Committer: Nicolas Joseph
  • Date: 2011-01-19 18:07:06 UTC
  • mfrom: (573.1.1 valide)
  • Revision ID: nicolas.joseph@valaide.org-20110119180706-mvys0ud8vgctbf2h
monkey 2011-01-19 Update to vala 0.11.4 (Add index_of, index_of_char, and char_count to string class)

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
                                                "object that is not in current namespace(%s)", prefix);
81
81
                                        }
82
82
                                        /* else */
83
 
                                        Event.mapping_start_initialize(ref event, null, "!" + type_name.offset(prefix.length), false);
 
83
                                        Event.mapping_start_initialize(ref event, null, "!" + type_name.substring(prefix.length), false);
84
84
                                } else {
85
85
                                        Event.mapping_start_initialize(ref event, null, "!" + type_name, false);
86
86
                                }
230
230
                        Event.clean(ref event);
231
231
                }
232
232
                private void write_scalar(ref Event event, string str) {
233
 
                        if(null != str.chr(-1, '\n')) {
 
233
                        if(0 != str.index_of_char(-1, '\n')) {
234
234
                                Event.scalar_initialize(ref event, null, null, str, (int)str.length, true, true,
235
235
                                        ScalarStyle.LITERAL_SCALAR_STYLE);
236
236
                        } else {