ext/rinku/rinku.c in rinku-1.3.0 vs ext/rinku/rinku.c in rinku-1.3.1
- old
+ new
@@ -24,10 +24,11 @@
#define rb_enc_copy(dst, src)
#endif
#include "autolink.h"
#include "buffer.h"
+#include "houdini.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
@@ -168,11 +169,11 @@
char active_chars[256];
void (*link_url_cb)(struct buf *, const struct buf *, void *);
int link_count = 0;
if (!text || size == 0)
- return;
+ return 0;
memset(active_chars, 0x0, sizeof(active_chars));
active_chars['<'] = AUTOLINK_ACTION_SKIP_TAG;
@@ -197,11 +198,11 @@
i = end = 0;
while (i < size) {
size_t rewind, link_end;
- char action;
+ char action = 0;
while (end < size && (action = active_chars[text[end]]) == 0)
end++;
if (end == size) {
@@ -342,10 +343,10 @@
Check_Type(rb_html, T_STRING);
link_attr = RSTRING_PTR(rb_html);
}
if (!NIL_P(rb_skip)) {
- long i;
+ size_t i;
Check_Type(rb_skip, T_ARRAY);
skip_tags_count = RARRAY_LEN(rb_skip);
skip_tags = malloc(sizeof(void *) * skip_tags_count);