nokogiri 1.8.2-x64-mingw32 → 1.8.3-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of nokogiri might be problematic. Click here for more details.

Files changed (54) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +14 -14
  3. data/CHANGELOG.md +43 -1
  4. data/LICENSE.md +2 -1
  5. data/Manifest.txt +3 -0
  6. data/README.md +20 -21
  7. data/Rakefile +2 -8
  8. data/SECURITY.md +19 -0
  9. data/build_all +2 -2
  10. data/dependencies.yml +11 -11
  11. data/ext/nokogiri/extconf.rb +1 -1
  12. data/ext/nokogiri/html_element_description.c +14 -14
  13. data/ext/nokogiri/xml_cdata.c +6 -4
  14. data/ext/nokogiri/xml_document.c +2 -3
  15. data/ext/nokogiri/xml_dtd.c +2 -2
  16. data/ext/nokogiri/xml_io.c +1 -0
  17. data/ext/nokogiri/xml_namespace.c +3 -9
  18. data/ext/nokogiri/xml_namespace.h +2 -0
  19. data/ext/nokogiri/xml_node.c +23 -15
  20. data/ext/nokogiri/xml_node_set.c +5 -4
  21. data/ext/nokogiri/xml_node_set.h +0 -1
  22. data/ext/nokogiri/xslt_stylesheet.c +2 -2
  23. data/lib/nokogiri/2.2/nokogiri.so +0 -0
  24. data/lib/nokogiri/2.3/nokogiri.so +0 -0
  25. data/lib/nokogiri/2.4/nokogiri.so +0 -0
  26. data/lib/nokogiri/2.5/nokogiri.so +0 -0
  27. data/lib/nokogiri/css/parser.rb +108 -90
  28. data/lib/nokogiri/css/parser.y +13 -2
  29. data/lib/nokogiri/css/tokenizer.rb +1 -1
  30. data/lib/nokogiri/css/tokenizer.rex +4 -4
  31. data/lib/nokogiri/css/xpath_visitor.rb +10 -3
  32. data/lib/nokogiri/html/document_fragment.rb +11 -1
  33. data/lib/nokogiri/version.rb +1 -1
  34. data/lib/nokogiri/xml/node.rb +58 -0
  35. data/lib/nokogiri/xml/node_set.rb +32 -18
  36. data/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch +78 -0
  37. data/test/css/test_nthiness.rb +21 -21
  38. data/test/css/test_parser.rb +17 -0
  39. data/test/html/test_attributes.rb +85 -0
  40. data/test/html/test_document_fragment.rb +7 -1
  41. data/test/test_css_cache.rb +5 -3
  42. data/test/xml/sax/test_parser.rb +9 -1
  43. data/test/xml/sax/test_push_parser.rb +60 -0
  44. data/test/xml/test_cdata.rb +1 -1
  45. data/test/xml/test_document.rb +5 -5
  46. data/test/xml/test_dtd.rb +4 -4
  47. data/test/xml/test_node.rb +89 -6
  48. data/test/xml/test_node_attributes.rb +3 -3
  49. data/test/xml/test_node_reparenting.rb +18 -0
  50. data/test/xml/test_node_set.rb +31 -4
  51. data/test/xml/test_reader.rb +13 -1
  52. data/test/xml/test_syntax_error.rb +3 -3
  53. data/test/xml/test_xpath.rb +8 -0
  54. metadata +26 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 1e155e9729ce0f47b98bd0d74117bfa1b2ac5e4b
4
- data.tar.gz: 4e40f36a9bdf41201a1b95ef9fa237b113dbb168
2
+ SHA256:
3
+ metadata.gz: a573cf77743aed03a85d412b64d8fd02ea9d749822aa2450dfa4ec49ecb06487
4
+ data.tar.gz: 27e3b0c9ddda2a86e87e9dd2df6400d1fa45b0a997aec1a4c61a8c9c32df53a7
5
5
  SHA512:
6
- metadata.gz: 9cb84c4892f6712a8e448e6891ecbab37e905ed5f21e6eac5c7b906f9c07e011ba9e639565324cee8e62f0239c6691b9a215b1a775d4a3e1a6558e0a834b4bb9
7
- data.tar.gz: 98833a409e3131f952f148fe43cc12c0b251733c17bcf393482a95876b7a2efb5b8734261d2f3b8e052c181ad5d5a666a5609db197479a6223fad1f418dfef07
6
+ metadata.gz: fefc720063e881a4846fd1c6e7e84d603f98a5e1bdde66ab85b67d532d47010ba88e2e1218cbb145a8ad3fa23d27f71053d03b738c210a85d03e8041f4d3667e
7
+ data.tar.gz: a0a6974cd75562ccb34a0e76d20c964fb3ddc57edd6cc36bdcf0d30b21791cef91793344f5762cd2f4a50e7fbaa0a0547fa618e3bdb7ddd1d58af48d051b1daf
@@ -18,15 +18,15 @@ matrix:
18
18
  - os: osx
19
19
  rvm: 2.2.5
20
20
  - os: linux
21
- rvm: 2.3.1
21
+ rvm: 2.3.5
22
22
  - os: osx
23
- rvm: 2.3.1
23
+ rvm: 2.3.5
24
24
  - os: linux
25
- rvm: 2.4.0
25
+ rvm: 2.4.2
26
26
  env:
27
27
  - RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal"
28
28
  - os: osx
29
- rvm: 2.4.0
29
+ rvm: 2.4.2
30
30
  env:
31
31
  - RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal"
32
32
  - os: linux
@@ -40,22 +40,22 @@ matrix:
40
40
  - os: linux
41
41
  rvm: jruby-1.7
42
42
  - os: linux
43
- rvm: jruby-9.1.5.0
43
+ rvm: jruby-9.1.15.0
44
44
  - os: linux
45
45
  rvm: rbx-3
46
46
  allow_failures:
47
47
  - rvm: ruby-head
48
48
  fast_finish: true
49
49
 
50
- notifications:
51
- irc:
52
- channels:
53
- - "chat.freenode.net#nokogiri"
54
- on_success: always
55
- on_failure: always
56
- template:
57
- - "%{repository} (%{branch}:%{commit} by %{author}): %{message} (%{build_url})"
58
- skip_join: true
50
+ # notifications:
51
+ # irc:
52
+ # channels:
53
+ # - "chat.freenode.net#nokogiri"
54
+ # on_success: always
55
+ # on_failure: always
56
+ # template:
57
+ # - "%{repository} (%{branch}:%{commit} by %{author}): %{message} (%{build_url})"
58
+ # skip_join: true
59
59
 
60
60
  addons:
61
61
  apt:
@@ -1,3 +1,45 @@
1
+ # 1.8.3 / 2018-06-16
2
+
3
+ ## Security Notes
4
+
5
+ [MRI] Behavior in libxml2 has been reverted which caused CVE-2018-8048 (loofah gem), CVE-2018-3740 (sanitize gem), and CVE-2018-3741 (rails-html-sanitizer gem). The commit in question is here:
6
+
7
+ > https://github.com/GNOME/libxml2/commit/960f0e2
8
+
9
+ and more information is available about this commit and its impact here:
10
+
11
+ > https://github.com/flavorjones/loofah/issues/144
12
+
13
+ This release simply reverts the libxml2 commit in question to protect users of Nokogiri's vendored libraries from similar vulnerabilities.
14
+
15
+ If you're offended by what happened here, I'd kindly ask that you comment on the upstream bug report here:
16
+
17
+ > https://bugzilla.gnome.org/show_bug.cgi?id=769760
18
+
19
+
20
+ ## Dependencies
21
+
22
+ * [MRI] libxml2 is updated from 2.9.7 to 2.9.8
23
+
24
+
25
+ ## Features
26
+
27
+ * Node#classes, #add_class, #append_class, and #remove_class are added.
28
+ * NodeSet#append_class is added.
29
+ * NodeSet#remove_attribute is a new alias for NodeSet#remove_attr.
30
+ * NodeSet#each now returns an Enumerator when no block is passed (Thanks, @park53kr!)
31
+ * [JRuby] General improvements in JRuby implementation (Thanks, @kares!)
32
+
33
+
34
+ ## Bug fixes
35
+
36
+ * CSS attribute selectors now gracefully handle queries using integers. [#711]
37
+ * Handle ASCII-8BIT encoding on fragment input [#553]
38
+ * Handle non-string return values within `Reader` [#898]
39
+ * [JRuby] Allow Node#replace to insert Comment and CDATA nodes. [#1666]
40
+ * [JRuby] Stability and speed improvements to `Node`, `Sax::PushParser`, and the JRuby implementation [#1708, #1710, #1501]
41
+
42
+
1
43
  # 1.8.2 / 2018-01-29
2
44
 
3
45
  ## Security Notes
@@ -8,7 +50,7 @@
8
50
  ## Dependencies
9
51
 
10
52
  * [MRI] libxml2 is updated from 2.9.5 to 2.9.7
11
- * [MRI] libxml2 is updated from 1.1.30 to 1.1.32
53
+ * [MRI] libxslt is updated from 1.1.30 to 1.1.32
12
54
 
13
55
 
14
56
  ## Features
data/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2008 - 2017:
3
+ Copyright (c) 2008 - 2018:
4
4
 
5
5
  * [Aaron Patterson](http://tenderlovemaking.com)
6
6
  * [Mike Dalessio](http://mike.daless.io)
@@ -10,6 +10,7 @@ Copyright (c) 2008 - 2017:
10
10
  * [Yoko Harada](http://yokolet.blogspot.com)
11
11
  * [Akinori MUSHA](https://akinori.org)
12
12
  * [John Shahid](https://github.com/jvshahid)
13
+ * [Lars Kanis](https://github.com/larskanis)
13
14
 
14
15
  Permission is hereby granted, free of charge, to any person obtaining
15
16
  a copy of this software and associated documentation files (the
@@ -14,6 +14,7 @@ Manifest.txt
14
14
  README.md
15
15
  ROADMAP.md
16
16
  Rakefile
17
+ SECURITY.md
17
18
  STANDARD_RESPONSES.md
18
19
  Y_U_NO_GEMSPEC.md
19
20
  appveyor.yml
@@ -249,6 +250,7 @@ lib/xalan.jar
249
250
  lib/xercesImpl.jar
250
251
  lib/xml-apis.jar
251
252
  lib/xsd/xmlparser/nokogiri.rb
253
+ patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch
252
254
  patches/sort-patches-by-date
253
255
  suppressions/README.txt
254
256
  suppressions/nokogiri_ruby-2.supp
@@ -300,6 +302,7 @@ test/html/sax/test_parser.rb
300
302
  test/html/sax/test_parser_context.rb
301
303
  test/html/sax/test_parser_text.rb
302
304
  test/html/sax/test_push_parser.rb
305
+ test/html/test_attributes.rb
303
306
  test/html/test_builder.rb
304
307
  test/html/test_document.rb
305
308
  test/html/test_document_encoding.rb
data/README.md CHANGED
@@ -1,30 +1,24 @@
1
1
  # Nokogiri
2
2
 
3
- * http://nokogiri.org
4
- * Installation: http://nokogiri.org/tutorials/installing_nokogiri.html
5
- * Tutorials: http://nokogiri.org
6
- * README: https://github.com/sparklemotion/nokogiri
7
- * Mailing List: https://groups.google.com/group/nokogiri-talk
8
- * Bug Reports: https://github.com/sparklemotion/nokogiri/issues
9
-
10
-
11
- ## Status
12
-
13
- |System|Status|
14
- |--|--|
15
- | Concourse | [![Concourse CI](https://ci.nokogiri.org/api/v1/teams/nokogiri-core/pipelines/nokogiri/jobs/ruby-2.4-system/badge)](https://ci.nokogiri.org/teams/nokogiri-core/pipelines/nokogiri?groups=master) |
16
- | Travis | [![Travis Build Status](https://travis-ci.org/sparklemotion/nokogiri.svg?branch=master)](https://travis-ci.org/sparklemotion/nokogiri) |
17
- | Appveyor | [![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/github/sparklemotion/nokogiri?branch=master&svg=true)](https://ci.appveyor.com/project/flavorjones/nokogiri?branch=master) |
18
- | Code Climate | [![Code Climate](https://codeclimate.com/github/sparklemotion/nokogiri.svg)](https://codeclimate.com/github/sparklemotion/nokogiri) |
19
- | Version Eye | [![Version Eye](https://www.versioneye.com/ruby/nokogiri/badge.png)](https://www.versioneye.com/ruby/nokogiri) |
20
-
21
-
22
3
  ## Description
23
4
 
24
5
  Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser. Among
25
6
  Nokogiri's many features is the ability to search documents via XPath
26
7
  or CSS3 selectors.
27
8
 
9
+ * http://nokogiri.org
10
+ * [Installation Help](http://nokogiri.org/tutorials/installing_nokogiri.html)
11
+ * [Tutorials](http://nokogiri.org)
12
+ * [GitHub](https://github.com/sparklemotion/nokogiri)
13
+ * [Mailing List](https://groups.google.com/group/nokogiri-talk)
14
+ * [Bug Reports](https://github.com/sparklemotion/nokogiri/issues)
15
+ * [Chat/Gitter](https://gitter.im/sparklemotion/nokogiri)
16
+
17
+ [![Concourse CI](https://ci.nokogiri.org/api/v1/teams/nokogiri-core/pipelines/nokogiri/jobs/ruby-2.4-system/badge)](https://ci.nokogiri.org/teams/nokogiri-core/pipelines/nokogiri?groups=master)
18
+ [![Code Climate](https://codeclimate.com/github/sparklemotion/nokogiri.svg)](https://codeclimate.com/github/sparklemotion/nokogiri)
19
+ [![Version Eye](https://www.versioneye.com/ruby/nokogiri/badge.png)](https://www.versioneye.com/ruby/nokogiri)
20
+ [![Join the chat at https://gitter.im/sparklemotion/nokogiri](https://badges.gitter.im/sparklemotion/nokogiri.svg)](https://gitter.im/sparklemotion/nokogiri?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
21
+
28
22
 
29
23
  ## Features
30
24
 
@@ -81,6 +75,11 @@ There are open-source tutorials (to which we invite contributions!) here: http:/
81
75
  * The IRC channel is #nokogiri on freenode.
82
76
 
83
77
 
78
+ ## Security and Vulnerability Reporting
79
+
80
+ See [`SECURITY.md`](SECURITY.md)
81
+
82
+
84
83
  ## Synopsis
85
84
 
86
85
  Nokogiri is a large library, but here is example usage for parsing and examining a document:
@@ -158,7 +157,7 @@ best bet is to explicitly set the encoding. Here is an example of
158
157
  explicitly setting the encoding to EUC-JP on the parser:
159
158
 
160
159
  ```ruby
161
- doc = Nokogiri.XML('<foo><bar /><foo>', nil, 'EUC-JP')
160
+ doc = Nokogiri.XML('<foo><bar /></foo>', nil, 'EUC-JP')
162
161
  ```
163
162
 
164
163
  ## Development
@@ -170,4 +169,4 @@ explicitly setting the encoding to EUC-JP on the parser:
170
169
 
171
170
  ## License
172
171
 
173
- MIT. See the `LICENSE.md` file.
172
+ MIT. See [`LICENSE.md`](LICENSE.md).
data/Rakefile CHANGED
@@ -107,6 +107,8 @@ HOE = Hoe.spec 'nokogiri' do
107
107
  developer 'Yoko Harada', 'yokolet@gmail.com'
108
108
  developer 'Tim Elliott', 'tle@holymonkey.com'
109
109
  developer 'Akinori MUSHA', 'knu@idaemons.org'
110
+ developer 'John Shahid', 'jvshahid@gmail.com'
111
+ developer 'Lars Kanis', 'lars@greiz-reinsdorf.de'
110
112
 
111
113
  license "MIT"
112
114
 
@@ -292,14 +294,6 @@ task :java_debug do
292
294
  ENV['JAVA_OPTS'] = '-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y' if ENV['JAVA_DEBUG']
293
295
  end
294
296
 
295
- if java?
296
- task :test_19 => :test
297
- task :test_20 do
298
- ENV['JRUBY_OPTS'] = "--2.0"
299
- Rake::Task["test"].invoke
300
- end
301
- end
302
-
303
297
  Rake::Task[:test].prerequisites << :compile
304
298
  Rake::Task[:test].prerequisites << :java_debug
305
299
  Rake::Task[:test].prerequisites << :check_extra_deps unless java?
@@ -0,0 +1,19 @@
1
+ # Security and Vulnerability Reporting
2
+
3
+ The Nokogiri Core Contributors take security very seriously and investigate all reported vulnerabilities.
4
+
5
+ If you would like to report a vulnerablity or have a security concern regarding Nokogiri or how Nokogiri is using any of its underlying platform-specific libraries (such as libxml2 or xerces), please [report it via HackerOne](https://hackerone.com/nokogiri/reports/new).
6
+
7
+ Your report will be acknowledged within 24 hours, and you'll receive a more detailed response within 72 hours indicating next steps in handling your report.
8
+
9
+ If you have not received a reply to your submission within 48 hours, there are a few steps you can take:
10
+
11
+ * Contact the current security coordinator (Mike Dalessio <mike.dalessio@gmail.com>)
12
+ * Contact the core contributor mailing list (nokogiri-core@googlegroups.com)
13
+ * Join the [nokogiri-talk group](https://groups.google.com/d/forum/nokogiri-talk)
14
+
15
+ Please note, the nokogiri-talk list is a public area. When escalating in that venue, please do not discuss your issue. Simply say that you're trying to get a hold of someone from the core team.
16
+
17
+ The information you share with the Nokogiri Core Contributors as part of this process will be kept confidential within the team, unless or until we need to share information upstream with our dependent libraries' core teams, at which point we will notify you.
18
+
19
+ If a vulnerability is first reported by you, we will credit you with the discovery in the public disclosure.
data/build_all CHANGED
@@ -37,8 +37,8 @@ cp -v pkg/nokogiri*.gem gems
37
37
  bundle exec rake clean clobber
38
38
  bundle exec rake generate
39
39
 
40
- rvm jruby-1.7.19
40
+ rvm jruby
41
41
  gem install bundler --conservative
42
42
  bundle install --quiet --local || bundle install
43
- bundle exec rake gem
43
+ bundle exec ruby -S rake gem
44
44
  cp -v pkg/nokogiri*java.gem gems
@@ -1,10 +1,10 @@
1
1
  libxml2:
2
- version: "2.9.7"
3
- sha256: "f63c5e7d30362ed28b38bfa1ac6313f9a80230720b7fb6c80575eeab3ff5900c"
2
+ version: "2.9.8"
3
+ sha256: "0b74e51595654f958148759cfef0993114ddccccbb6f31aee018f3558e8e2732"
4
4
  # manually verified checksum:
5
5
  #
6
- # $ gpg --verify libxml2-2.9.7.tar.gz.asc libxml2-2.9.7.tar.gz
7
- # gpg: Signature made Thu 02 Nov 2017 04:17:54 PM EDT using RSA key ID 596BEA5D
6
+ # $ gpg --verify libxml2-2.9.8.tar.gz.asc ./ports/archives/libxml2-2.9.8.tar.gz
7
+ # gpg: Signature made Mon 05 Mar 2018 11:07:45 AM EST using RSA key ID 596BEA5D
8
8
  # gpg: Good signature from "Daniel Veillard (Red Hat work email) <veillard@redhat.com>"
9
9
  # gpg: aka "Daniel Veillard <Daniel.Veillard@w3.org>"
10
10
  # gpg: WARNING: This key is not certified with a trusted signature!
@@ -15,13 +15,13 @@ libxml2:
15
15
  # using this pgp signature:
16
16
  # -----BEGIN PGP SIGNATURE-----
17
17
  #
18
- # iQEcBAABAgAGBQJZ+31yAAoJEBVYiyZZa+pd+MMH/RTsPCo8CegAHsSUlNCae2Ay
19
- # HpM6J7sNWs0b2xwaYRtwhewJ5z/rsCcM5nn7MeGiU8dX7W5MKF69uGXUywufRxzO
20
- # GFoQSxO0a1z5mtGu7jC/W6DTYHFBeOJcEfMa3zUZjZ0RXqrENRhX55okse4pJPmG
21
- # dWQphbu9G3qoCuWD7QpyI7Mjhjemmyi4Ai/4vJPO8WtB7VDfdtpuZFVCRLG2cp0X
22
- # 90SZde+0oWJcN8oIG3FaTd7O4OuJPAceqNhTvF90dLvqSqRBd0RqZNnjYNYZ6uRy
23
- # FQSlQBVCxdLY0AI7Yooq79TJD+0vcqiQNwQwH7L+hBWgvPos4DKN1M9LaJc/RTk=
24
- # =5Qzo
18
+ # iQEcBAABAgAGBQJanWtRAAoJEBVYiyZZa+pdV7oIAJWdFahwt+reN/Zt2RPmjjcr
19
+ # eSsY7UV1RXjScnNjTzJT1h2hJ7SnUjCkqjR6VdtKDUIzpuX+S2U83joafJH6mxUb
20
+ # yw2nO4RfjYTPxpz5JkvqT7jmgEIaD81BuwcMehqpMpIfiKa2NgO1DSfZxgs8a9E2
21
+ # +ehc/kZWuI5gmNGrd84EEWUqpYW/Xx7jy02osioJuU5IMPjzZKNR3maXp9oAKeBc
22
+ # S2QNa1ID/pUk3K3M/5nlwNgAtQ7lxQrqhrSma2dsKt/IpL6VXomxuD4Bh1r2MZhX
23
+ # uZ456X/xJN8UmPewLZWGBU1MK9wqu3Zx5Qwz64H6UdlYIzXZ2jXj2YWZa6xkxPA=
24
+ # =69xn
25
25
  # -----END PGP SIGNATURE-----
26
26
  #
27
27
 
@@ -434,7 +434,7 @@ end
434
434
 
435
435
  if RbConfig::MAKEFILE_CONFIG['CC'] =~ /gcc/
436
436
  $CFLAGS << " -O3" unless $CFLAGS[/-O\d/]
437
- $CFLAGS << " -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline"
437
+ $CFLAGS << " -Wall -Wcast-qual -Wwrite-strings -Wextra -Wmissing-noreturn -Winline"
438
438
  end
439
439
 
440
440
  case
@@ -8,7 +8,7 @@
8
8
  */
9
9
  static VALUE required_attributes(VALUE self)
10
10
  {
11
- htmlElemDesc * description;
11
+ const htmlElemDesc * description;
12
12
  VALUE list;
13
13
  int i;
14
14
 
@@ -33,7 +33,7 @@ static VALUE required_attributes(VALUE self)
33
33
  */
34
34
  static VALUE deprecated_attributes(VALUE self)
35
35
  {
36
- htmlElemDesc * description;
36
+ const htmlElemDesc * description;
37
37
  VALUE list;
38
38
  int i;
39
39
 
@@ -58,7 +58,7 @@ static VALUE deprecated_attributes(VALUE self)
58
58
  */
59
59
  static VALUE optional_attributes(VALUE self)
60
60
  {
61
- htmlElemDesc * description;
61
+ const htmlElemDesc * description;
62
62
  VALUE list;
63
63
  int i;
64
64
 
@@ -83,7 +83,7 @@ static VALUE optional_attributes(VALUE self)
83
83
  */
84
84
  static VALUE default_sub_element(VALUE self)
85
85
  {
86
- htmlElemDesc * description;
86
+ const htmlElemDesc * description;
87
87
  Data_Get_Struct(self, htmlElemDesc, description);
88
88
 
89
89
  if (description->defaultsubelt)
@@ -100,7 +100,7 @@ static VALUE default_sub_element(VALUE self)
100
100
  */
101
101
  static VALUE sub_elements(VALUE self)
102
102
  {
103
- htmlElemDesc * description;
103
+ const htmlElemDesc * description;
104
104
  VALUE list;
105
105
  int i;
106
106
 
@@ -125,7 +125,7 @@ static VALUE sub_elements(VALUE self)
125
125
  */
126
126
  static VALUE description(VALUE self)
127
127
  {
128
- htmlElemDesc * description;
128
+ const htmlElemDesc * description;
129
129
  Data_Get_Struct(self, htmlElemDesc, description);
130
130
 
131
131
  return NOKOGIRI_STR_NEW2(description->desc);
@@ -139,7 +139,7 @@ static VALUE description(VALUE self)
139
139
  */
140
140
  static VALUE inline_eh(VALUE self)
141
141
  {
142
- htmlElemDesc * description;
142
+ const htmlElemDesc * description;
143
143
  Data_Get_Struct(self, htmlElemDesc, description);
144
144
 
145
145
  if(description->isinline) return Qtrue;
@@ -154,7 +154,7 @@ static VALUE inline_eh(VALUE self)
154
154
  */
155
155
  static VALUE deprecated_eh(VALUE self)
156
156
  {
157
- htmlElemDesc * description;
157
+ const htmlElemDesc * description;
158
158
  Data_Get_Struct(self, htmlElemDesc, description);
159
159
 
160
160
  if(description->depr) return Qtrue;
@@ -169,7 +169,7 @@ static VALUE deprecated_eh(VALUE self)
169
169
  */
170
170
  static VALUE empty_eh(VALUE self)
171
171
  {
172
- htmlElemDesc * description;
172
+ const htmlElemDesc * description;
173
173
  Data_Get_Struct(self, htmlElemDesc, description);
174
174
 
175
175
  if(description->empty) return Qtrue;
@@ -184,7 +184,7 @@ static VALUE empty_eh(VALUE self)
184
184
  */
185
185
  static VALUE save_end_tag_eh(VALUE self)
186
186
  {
187
- htmlElemDesc * description;
187
+ const htmlElemDesc * description;
188
188
  Data_Get_Struct(self, htmlElemDesc, description);
189
189
 
190
190
  if(description->saveEndTag) return Qtrue;
@@ -199,7 +199,7 @@ static VALUE save_end_tag_eh(VALUE self)
199
199
  */
200
200
  static VALUE implied_end_tag_eh(VALUE self)
201
201
  {
202
- htmlElemDesc * description;
202
+ const htmlElemDesc * description;
203
203
  Data_Get_Struct(self, htmlElemDesc, description);
204
204
 
205
205
  if(description->endTag) return Qtrue;
@@ -214,7 +214,7 @@ static VALUE implied_end_tag_eh(VALUE self)
214
214
  */
215
215
  static VALUE implied_start_tag_eh(VALUE self)
216
216
  {
217
- htmlElemDesc * description;
217
+ const htmlElemDesc * description;
218
218
  Data_Get_Struct(self, htmlElemDesc, description);
219
219
 
220
220
  if(description->startTag) return Qtrue;
@@ -229,7 +229,7 @@ static VALUE implied_start_tag_eh(VALUE self)
229
229
  */
230
230
  static VALUE name(VALUE self)
231
231
  {
232
- htmlElemDesc * description;
232
+ const htmlElemDesc * description;
233
233
  Data_Get_Struct(self, htmlElemDesc, description);
234
234
 
235
235
  if(NULL == description->name) return Qnil;
@@ -249,7 +249,7 @@ static VALUE get_description(VALUE klass, VALUE tag_name)
249
249
  );
250
250
 
251
251
  if(NULL == description) return Qnil;
252
- return Data_Wrap_Struct(klass, 0, 0, (void *)description);
252
+ return Data_Wrap_Struct(klass, 0, 0, (void *)(uintptr_t)description);
253
253
  }
254
254
 
255
255
  VALUE cNokogiriHtmlElementDescription ;