Skip to content

Commit

Permalink
Merge 93ebe94 into 8b109bf
Browse files Browse the repository at this point in the history
  • Loading branch information
preetpalS committed Aug 13, 2020
2 parents 8b109bf + 93ebe94 commit aba66fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ext/nokogiri/xml_document.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static void dealloc(xmlDocPtr doc)

node_hash = DOC_UNLINKED_NODE_HASH(doc);

st_foreach(node_hash, dealloc_node_i, (st_data_t)doc);
st_foreach(node_hash, (int(*)(st_data_t, st_data_t, st_data_t))dealloc_node_i, (st_data_t)doc);
st_free_table(node_hash);

free(doc->_private);
Expand Down
4 changes: 2 additions & 2 deletions ext/nokogiri/xml_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ int io_read_callback(void * ctx, char * buffer, int len) {
args[0] = (VALUE)ctx;
args[1] = INT2NUM(len);

string = rb_rescue(read_check, (VALUE)args, read_failed, 0);
string = rb_rescue((VALUE(*)(VALUE))read_check, (VALUE)args, (VALUE(*)(VALUE,VALUE))read_failed, 0);

if (NIL_P(string)) return 0;
if (string == Qundef) return -1;
Expand All @@ -44,7 +44,7 @@ int io_write_callback(void * ctx, char * buffer, int len) {
args[0] = (VALUE)ctx;
args[1] = rb_str_new(buffer, (long)len);

size = rb_rescue(write_check, (VALUE)args, write_failed, 0);
size = rb_rescue((VALUE(*)(VALUE))write_check, (VALUE)args, (VALUE(*)(VALUE,VALUE))write_failed, 0);

if (size == Qundef) return -1;

Expand Down

0 comments on commit aba66fd

Please sign in to comment.