rubys / nokogumbo

A Nokogiri interface to the Gumbo HTML5 parser.
Apache License 2.0
186 stars 114 forks source link

Wrap ParseArgs in a Ruby object #152

Closed stevecheckoway closed 3 years ago

stevecheckoway commented 3 years ago

The functions passed to rb_ensure should be VALUEs. It's probably the case that Ruby is going to pass these directly without ever examining them, but maybe not.

This wraps the ParseArgs pointer as a Ruby object (of class Data which is what the documentation seems to suggest rather than class Object, but Data is also deprecated so who knows?).

This fixes several compilation warnings about mismatched types.