nokogumbo 1.1.9 → 1.1.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -34,6 +34,13 @@ unless have_library('gumbo', 'gumbo_parse')
34
34
  require 'fileutils'
35
35
  FileUtils.cp Dir["#{rakehome}/gumbo-parser/src/*"],
36
36
  "#{rakehome}/ext/nokogumboc"
37
+
38
+ case RbConfig::CONFIG['target_os']
39
+ when 'mingw32', /mswin/
40
+ FileUtils.cp Dir["#{rakehome}/gumbo-parser/visualc/include/*"],
41
+ "#{rakehome}/ext/nokogumboc"
42
+ end
43
+
37
44
  $srcs = $objs = nil
38
45
  end
39
46
  end
@@ -92,7 +92,11 @@ static xmlNodePtr walk_tree(xmlDocPtr document, GumboElement *node) {
92
92
  } else {
93
93
  GumboStringPiece tag = node->original_tag;
94
94
  gumbo_tag_from_original_text(&tag);
95
+ #ifdef _MSC_VER
96
+ char* name = alloca(tag.length+1);
97
+ #else
95
98
  char name[tag.length+1];
99
+ #endif
96
100
  strncpy(name, tag.data, tag.length);
97
101
  name[tag.length] = '\0';
98
102
  element = xmlNewDocNode(document, NIL, CONST_CAST name, NIL);
@@ -0,0 +1,3 @@
1
+ /*Dummy file to satisfy source file dependencies on Windows platform*/
2
+ #define strcasecmp _stricmp
3
+ #define strncasecmp _strnicmp
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nokogumbo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.9
4
+ version: 1.1.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-11 00:00:00.000000000 Z
12
+ date: 2014-07-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -65,6 +65,7 @@ files:
65
65
  - gumbo-parser/src/util.h
66
66
  - gumbo-parser/src/vector.c
67
67
  - gumbo-parser/src/vector.h
68
+ - gumbo-parser/visualc/include/strings.h
68
69
  homepage: https://github.com/rubys/nokogumbo/#readme
69
70
  licenses:
70
71
  - Apache 2.0