GMarkup: share some common code for closing tags
authorRyan Lortie <desrt@desrt.ca>
Mon, 28 Oct 2013 20:56:26 +0000 (13:56 -0700)
committerRyan Lortie <desrt@desrt.ca>
Mon, 28 Oct 2013 22:24:58 +0000 (15:24 -0700)
commitcbccbaeacfbde66f4b611b37752b0d96e77ca91e
tree45abaddcee64e50c9825a4b400362bf9d2405321
parent44f13124c9d6d66760bd800d7d1ce68dc53ad5f2
GMarkup: share some common code for closing tags

The code for dealing with </foo> and the second half of <foo/> was
largely duplicated.  We can share a lot of it by using a common
function.

This slightly changes the behaviour of the parser under error
circumstances: previously the parser would deal with '<foo/}' by first
issuing the end_element callback and then flagging the error due to the
unexpected character.  Now we will flag the unexpected character error
first, skipping the callback.

This behaviour change required modifying the testsuite.

https://bugzilla.gnome.org/show_bug.cgi?id=665634
glib/gmarkup.c
glib/tests/markups/fail-44.expected
glib/tests/markups/fail-8.expected