Skip to content

Commit

Permalink
Merge 0026e33 into 8b109bf
Browse files Browse the repository at this point in the history
  • Loading branch information
larskanis authored Aug 25, 2020
2 parents 8b109bf + 0026e33 commit c499f62
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
7 changes: 6 additions & 1 deletion ext/nokogiri/xml_document.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <xml_document.h>

static int dealloc_node_i(xmlNodePtr key, xmlNodePtr node, xmlDocPtr doc)
static int dealloc_node_i2(xmlNodePtr key, xmlNodePtr node, xmlDocPtr doc)
{
switch(node->type) {
case XML_ATTRIBUTE_NODE:
Expand All @@ -20,6 +20,11 @@ static int dealloc_node_i(xmlNodePtr key, xmlNodePtr node, xmlDocPtr doc)
return ST_CONTINUE;
}

static int dealloc_node_i(st_data_t key, st_data_t node, st_data_t doc)
{
return dealloc_node_i2((xmlNodePtr)key, (xmlNodePtr)node, (xmlDocPtr)doc);
}

static void remove_private(xmlNodePtr node)
{
xmlNodePtr child;
Expand Down
14 changes: 8 additions & 6 deletions ext/nokogiri/xml_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

static ID id_read, id_write;

VALUE read_check(VALUE *args) {
VALUE read_check(VALUE _args) {
VALUE *args = (VALUE *)_args;
return rb_funcall(args[0], id_read, 1, args[1]);
}

VALUE read_failed(void) {
return Qundef;
VALUE read_failed(VALUE arg, VALUE exc) {
return Qundef;
}

int io_read_callback(void * ctx, char * buffer, int len) {
Expand All @@ -30,12 +31,13 @@ int io_read_callback(void * ctx, char * buffer, int len) {
return (int)safe_len;
}

VALUE write_check(VALUE *args) {
VALUE write_check(VALUE _args) {
VALUE *args = (VALUE *)_args;
return rb_funcall(args[0], id_write, 1, args[1]);
}

VALUE write_failed(void) {
return Qundef;
VALUE write_failed(VALUE arg, VALUE exc) {
return Qundef;
}

int io_write_callback(void * ctx, char * buffer, int len) {
Expand Down

0 comments on commit c499f62

Please sign in to comment.