Closed bcpeinhardt closed 2 years ago
^^ Regarding my earlier commit message stack overflow tells me free
on a null pointer is a no-op not a double free but it sure feels wrong haha.
Thanks for contributing this @bcpeinhardt ! I was extra-slow in getting to replying to this PR, apologies.
One bit we can address here is the name of the new method. For example, we have a parser method called is_well_formed_html
, which is closer to what I would expect of a condition-checking function returning a boolean.
Maybe is_well_formed_xpath
would be a name that is easier to read in vacuum?
Haven't written any proper tests to see what the function covers, but getting back an error msg of "invalid xpath syntax" is promising!