nokogiri 1.13.8-x86-mingw32 → 1.13.9-x86-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 (41) hide show
  1. checksums.yaml +4 -4
  2. data/dependencies.yml +8 -8
  3. data/ext/nokogiri/extconf.rb +16 -3
  4. data/ext/nokogiri/include/libexslt/exsltconfig.h +1 -1
  5. data/ext/nokogiri/include/libexslt/exsltexports.h +32 -109
  6. data/ext/nokogiri/include/libxml2/libxml/SAX.h +36 -5
  7. data/ext/nokogiri/include/libxml2/libxml/SAX2.h +3 -9
  8. data/ext/nokogiri/include/libxml2/libxml/dict.h +2 -0
  9. data/ext/nokogiri/include/libxml2/libxml/encoding.h +5 -18
  10. data/ext/nokogiri/include/libxml2/libxml/entities.h +2 -0
  11. data/ext/nokogiri/include/libxml2/libxml/globals.h +3 -12
  12. data/ext/nokogiri/include/libxml2/libxml/nanoftp.h +25 -2
  13. data/ext/nokogiri/include/libxml2/libxml/parser.h +4 -3
  14. data/ext/nokogiri/include/libxml2/libxml/parserInternals.h +12 -0
  15. data/ext/nokogiri/include/libxml2/libxml/relaxng.h +1 -0
  16. data/ext/nokogiri/include/libxml2/libxml/schematron.h +1 -1
  17. data/ext/nokogiri/include/libxml2/libxml/threads.h +2 -0
  18. data/ext/nokogiri/include/libxml2/libxml/tree.h +5 -4
  19. data/ext/nokogiri/include/libxml2/libxml/valid.h +12 -7
  20. data/ext/nokogiri/include/libxml2/libxml/xmlerror.h +1 -0
  21. data/ext/nokogiri/include/libxml2/libxml/xmlmemory.h +2 -0
  22. data/ext/nokogiri/include/libxml2/libxml/xmlschemastypes.h +1 -0
  23. data/ext/nokogiri/include/libxml2/libxml/xmlversion.h +33 -15
  24. data/ext/nokogiri/include/libxml2/libxml/xpath.h +11 -0
  25. data/ext/nokogiri/include/libxml2/libxml/xpointer.h +23 -0
  26. data/ext/nokogiri/include/libxslt/xsltconfig.h +5 -6
  27. data/ext/nokogiri/include/libxslt/xsltexports.h +32 -110
  28. data/ext/nokogiri/include/libxslt/xsltlocale.h +1 -1
  29. data/ext/nokogiri/include/libxslt/xsltutils.h +0 -3
  30. data/ext/nokogiri/nokogiri.h +1 -0
  31. data/ext/nokogiri/xml_document.c +5 -1
  32. data/ext/nokogiri/xml_namespace.c +41 -5
  33. data/ext/nokogiri/xml_node.c +1 -1
  34. data/ext/nokogiri/xml_xpath_context.c +3 -0
  35. data/lib/nokogiri/2.6/nokogiri.so +0 -0
  36. data/lib/nokogiri/2.7/nokogiri.so +0 -0
  37. data/lib/nokogiri/3.0/nokogiri.so +0 -0
  38. data/lib/nokogiri/3.1/nokogiri.so +0 -0
  39. data/lib/nokogiri/version/constant.rb +1 -1
  40. metadata +2 -3
  41. data/ext/nokogiri/include/libxml2/libxml/DOCBparser.h +0 -96
@@ -3,134 +3,56 @@
3
3
  * Description: macros for marking symbols as exportable/importable.
4
4
  *
5
5
  * Copy: See Copyright for the status of this software.
6
- *
7
- * Author: Igor Zlatkovic <igor@zlatkovic.com>
8
6
  */
9
7
 
10
8
  #ifndef __XSLT_EXPORTS_H__
11
9
  #define __XSLT_EXPORTS_H__
12
10
 
13
- /**
14
- * XSLTPUBFUN:
15
- * XSLTPUBFUN, XSLTPUBVAR, XSLTCALL
16
- *
17
- * Macros which declare an exportable function, an exportable variable and
18
- * the calling convention used for functions.
19
- *
20
- * Please use an extra block for every platform/compiler combination when
21
- * modifying this, rather than overlong #ifdef lines. This helps
22
- * readability as well as the fact that different compilers on the same
23
- * platform might need different definitions.
24
- */
11
+ #if defined(_WIN32) || defined(__CYGWIN__)
12
+ /** DOC_DISABLE */
13
+
14
+ #ifdef LIBXSLT_STATIC
15
+ #define XSLTPUBLIC
16
+ #elif defined(IN_LIBXSLT)
17
+ #define XSLTPUBLIC __declspec(dllexport)
18
+ #else
19
+ #define XSLTPUBLIC __declspec(dllimport)
20
+ #endif
21
+
22
+ #define XSLTCALL __cdecl
23
+
24
+ /** DOC_ENABLE */
25
+ #else /* not Windows */
25
26
 
26
27
  /**
27
- * XSLTPUBFUN:
28
- *
29
- * Macros which declare an exportable function
30
- */
31
- #define XSLTPUBFUN
32
- /**
33
- * XSLTPUBVAR:
28
+ * XSLTPUBLIC:
34
29
  *
35
- * Macros which declare an exportable variable
30
+ * Macro which declares a public symbol
36
31
  */
37
- #define XSLTPUBVAR extern
32
+ #define XSLTPUBLIC
33
+
38
34
  /**
39
35
  * XSLTCALL:
40
36
  *
41
- * Macros which declare the called convention for exported functions
37
+ * Macro which declares the calling convention for exported functions
42
38
  */
43
39
  #define XSLTCALL
44
40
 
45
- /** DOC_DISABLE */
46
-
47
- /* Windows platform with MS compiler */
48
- #if defined(_WIN32) && defined(_MSC_VER)
49
- #undef XSLTPUBFUN
50
- #undef XSLTPUBVAR
51
- #undef XSLTCALL
52
- #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
53
- #define XSLTPUBFUN __declspec(dllexport)
54
- #define XSLTPUBVAR __declspec(dllexport)
55
- #else
56
- #define XSLTPUBFUN
57
- #if !defined(LIBXSLT_STATIC)
58
- #define XSLTPUBVAR __declspec(dllimport) extern
59
- #else
60
- #define XSLTPUBVAR extern
61
- #endif
62
- #endif
63
- #define XSLTCALL __cdecl
64
- #if !defined _REENTRANT
65
- #define _REENTRANT
66
- #endif
67
- #endif
68
-
69
- /* Windows platform with Borland compiler */
70
- #if defined(_WIN32) && defined(__BORLANDC__)
71
- #undef XSLTPUBFUN
72
- #undef XSLTPUBVAR
73
- #undef XSLTCALL
74
- #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
75
- #define XSLTPUBFUN __declspec(dllexport)
76
- #define XSLTPUBVAR __declspec(dllexport) extern
77
- #else
78
- #define XSLTPUBFUN
79
- #if !defined(LIBXSLT_STATIC)
80
- #define XSLTPUBVAR __declspec(dllimport) extern
81
- #else
82
- #define XSLTPUBVAR extern
83
- #endif
84
- #endif
85
- #define XSLTCALL __cdecl
86
- #if !defined _REENTRANT
87
- #define _REENTRANT
88
- #endif
89
- #endif
41
+ #endif /* platform switch */
90
42
 
91
- /* Windows platform with GNU compiler (Mingw) */
92
- #if defined(_WIN32) && defined(__MINGW32__)
93
- #undef XSLTPUBFUN
94
- #undef XSLTPUBVAR
95
- #undef XSLTCALL
96
43
  /*
97
- #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
98
- */
99
- #if !defined(LIBXSLT_STATIC)
100
- #define XSLTPUBFUN __declspec(dllexport)
101
- #define XSLTPUBVAR __declspec(dllexport) extern
102
- #else
103
- #define XSLTPUBFUN
104
- #if !defined(LIBXSLT_STATIC)
105
- #define XSLTPUBVAR __declspec(dllimport) extern
106
- #else
107
- #define XSLTPUBVAR extern
108
- #endif
109
- #endif
110
- #define XSLTCALL __cdecl
111
- #if !defined _REENTRANT
112
- #define _REENTRANT
113
- #endif
114
- #endif
44
+ * XSLTPUBFUN:
45
+ *
46
+ * Macro which declares an exportable function
47
+ */
48
+ #define XSLTPUBFUN XSLTPUBLIC
115
49
 
116
- /* Cygwin platform (does not define _WIN32), GNU compiler */
117
- #if defined(__CYGWIN__)
118
- #undef XSLTPUBFUN
119
- #undef XSLTPUBVAR
120
- #undef XSLTCALL
121
- #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
122
- #define XSLTPUBFUN __declspec(dllexport)
123
- #define XSLTPUBVAR __declspec(dllexport)
124
- #else
125
- #define XSLTPUBFUN
126
- #if !defined(LIBXSLT_STATIC)
127
- #define XSLTPUBVAR __declspec(dllimport) extern
128
- #else
129
- #define XSLTPUBVAR extern
130
- #endif
131
- #endif
132
- #define XSLTCALL __cdecl
133
- #endif
50
+ /**
51
+ * XSLTPUBVAR:
52
+ *
53
+ * Macro which declares an exportable variable
54
+ */
55
+ #define XSLTPUBVAR XSLTPUBLIC extern
134
56
 
135
57
  /* Compatibility */
136
58
  #if !defined(LIBXSLT_PUBLIC)
@@ -32,7 +32,7 @@
32
32
  typedef locale_t xsltLocale;
33
33
  typedef xmlChar xsltLocaleChar;
34
34
 
35
- #elif defined(_WIN32) && !defined(__CYGWIN__)
35
+ #elif defined(_WIN32)
36
36
 
37
37
  /*
38
38
  * XSLT_LOCALE_WINAPI:
@@ -13,9 +13,6 @@
13
13
  #define __XML_XSLTUTILS_H__
14
14
 
15
15
  #include <libxslt/xsltconfig.h>
16
- #ifdef HAVE_STDARG_H
17
- #include <stdarg.h>
18
- #endif
19
16
  #include <libxml/xpath.h>
20
17
  #include <libxml/dict.h>
21
18
  #include <libxml/xmlerror.h>
@@ -171,6 +171,7 @@ int noko_io_write(void *ctx, char *buffer, int len);
171
171
  int noko_io_close(void *ctx);
172
172
 
173
173
  #define Noko_Node_Get_Struct(obj,type,sval) ((sval) = (type*)DATA_PTR(obj))
174
+ #define Noko_Namespace_Get_Struct(obj,type,sval) ((sval) = (type*)DATA_PTR(obj))
174
175
 
175
176
  VALUE noko_xml_node_wrap(VALUE klass, xmlNodePtr node) ;
176
177
  VALUE noko_xml_node_wrap_node_set_result(xmlNodePtr node, VALUE node_set) ;
@@ -104,7 +104,11 @@ recursively_remove_namespaces_from_node(xmlNodePtr node)
104
104
  (node->type == XML_XINCLUDE_START) ||
105
105
  (node->type == XML_XINCLUDE_END)) &&
106
106
  node->nsDef) {
107
- xmlFreeNsList(node->nsDef);
107
+ xmlNsPtr curr = node->nsDef;
108
+ while (curr) {
109
+ noko_xml_document_pin_namespace(curr, node->doc);
110
+ curr = curr->next;
111
+ }
108
112
  node->nsDef = NULL;
109
113
  }
110
114
 
@@ -25,13 +25,15 @@
25
25
  VALUE cNokogiriXmlNamespace ;
26
26
 
27
27
  static void
28
- dealloc_namespace(xmlNsPtr ns)
28
+ _xml_namespace_dealloc(void *ptr)
29
29
  {
30
30
  /*
31
31
  * this deallocator is only used for namespace nodes that are part of an xpath
32
32
  * node set. see noko_xml_namespace_wrap().
33
33
  */
34
+ xmlNsPtr ns = ptr;
34
35
  NOKOGIRI_DEBUG_START(ns) ;
36
+
35
37
  if (ns->href) {
36
38
  xmlFree(DISCARD_CONST_QUAL_XMLCHAR(ns->href));
37
39
  }
@@ -42,6 +44,36 @@ dealloc_namespace(xmlNsPtr ns)
42
44
  NOKOGIRI_DEBUG_END(ns) ;
43
45
  }
44
46
 
47
+ #ifdef HAVE_RB_GC_LOCATION
48
+ static void
49
+ _xml_namespace_update_references(void *ptr)
50
+ {
51
+ xmlNsPtr ns = ptr;
52
+ if (ns->_private) {
53
+ ns->_private = (void *)rb_gc_location((VALUE)ns->_private);
54
+ }
55
+ }
56
+ #else
57
+ # define _xml_namespace_update_references 0
58
+ #endif
59
+
60
+ static const rb_data_type_t nokogiri_xml_namespace_type_with_dealloc = {
61
+ "Nokogiri/XMLNamespace/WithDealloc",
62
+ {0, _xml_namespace_dealloc, 0, _xml_namespace_update_references},
63
+ 0, 0,
64
+ #ifdef RUBY_TYPED_FREE_IMMEDIATELY
65
+ RUBY_TYPED_FREE_IMMEDIATELY,
66
+ #endif
67
+ };
68
+
69
+ static const rb_data_type_t nokogiri_xml_namespace_type_without_dealloc = {
70
+ "Nokogiri/XMLNamespace/WithoutDealloc",
71
+ {0, 0, 0, _xml_namespace_update_references},
72
+ 0, 0,
73
+ #ifdef RUBY_TYPED_FREE_IMMEDIATELY
74
+ RUBY_TYPED_FREE_IMMEDIATELY,
75
+ #endif
76
+ };
45
77
 
46
78
  /*
47
79
  * call-seq:
@@ -54,7 +86,7 @@ prefix(VALUE self)
54
86
  {
55
87
  xmlNsPtr ns;
56
88
 
57
- Data_Get_Struct(self, xmlNs, ns);
89
+ Noko_Namespace_Get_Struct(self, xmlNs, ns);
58
90
  if (!ns->prefix) { return Qnil; }
59
91
 
60
92
  return NOKOGIRI_STR_NEW2(ns->prefix);
@@ -71,7 +103,7 @@ href(VALUE self)
71
103
  {
72
104
  xmlNsPtr ns;
73
105
 
74
- Data_Get_Struct(self, xmlNs, ns);
106
+ Noko_Namespace_Get_Struct(self, xmlNs, ns);
75
107
  if (!ns->href) { return Qnil; }
76
108
 
77
109
  return NOKOGIRI_STR_NEW2(ns->href);
@@ -87,14 +119,18 @@ noko_xml_namespace_wrap(xmlNsPtr c_namespace, xmlDocPtr c_document)
87
119
  }
88
120
 
89
121
  if (c_document) {
90
- rb_namespace = Data_Wrap_Struct(cNokogiriXmlNamespace, 0, 0, c_namespace);
122
+ rb_namespace = TypedData_Wrap_Struct(cNokogiriXmlNamespace,
123
+ &nokogiri_xml_namespace_type_without_dealloc,
124
+ c_namespace);
91
125
 
92
126
  if (DOC_RUBY_OBJECT_TEST(c_document)) {
93
127
  rb_iv_set(rb_namespace, "@document", DOC_RUBY_OBJECT(c_document));
94
128
  rb_ary_push(DOC_NODE_CACHE(c_document), rb_namespace);
95
129
  }
96
130
  } else {
97
- rb_namespace = Data_Wrap_Struct(cNokogiriXmlNamespace, 0, dealloc_namespace, c_namespace);
131
+ rb_namespace = TypedData_Wrap_Struct(cNokogiriXmlNamespace,
132
+ &nokogiri_xml_namespace_type_with_dealloc,
133
+ c_namespace);
98
134
  }
99
135
 
100
136
  c_namespace->_private = (void *)rb_namespace;
@@ -1353,7 +1353,7 @@ set_namespace(VALUE self, VALUE namespace)
1353
1353
  Noko_Node_Get_Struct(self, xmlNode, node);
1354
1354
 
1355
1355
  if (!NIL_P(namespace)) {
1356
- Data_Get_Struct(namespace, xmlNs, ns);
1356
+ Noko_Namespace_Get_Struct(namespace, xmlNs, ns);
1357
1357
  }
1358
1358
 
1359
1359
  xmlSetNs(node, ns);
@@ -373,7 +373,10 @@ new (VALUE klass, VALUE nodeobj)
373
373
 
374
374
  Noko_Node_Get_Struct(nodeobj, xmlNode, node);
375
375
 
376
+ #if LIBXML_VERSION < 21000
377
+ /* deprecated in 40483d0 */
376
378
  xmlXPathInit();
379
+ #endif
377
380
 
378
381
  ctx = xmlXPathNewContext(node->doc);
379
382
  ctx->node = node;
Binary file
Binary file
Binary file
Binary file
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Nokogiri
4
4
  # The version of Nokogiri you are using
5
- VERSION = "1.13.8"
5
+ VERSION = "1.13.9"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nokogiri
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.8
4
+ version: 1.13.9
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Mike Dalessio
@@ -20,7 +20,7 @@ authors:
20
20
  autorequire:
21
21
  bindir: bin
22
22
  cert_chain: []
23
- date: 2022-07-23 00:00:00.000000000 Z
23
+ date: 2022-10-18 00:00:00.000000000 Z
24
24
  dependencies:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: racc
@@ -323,7 +323,6 @@ files:
323
323
  - ext/nokogiri/include/libexslt/exslt.h
324
324
  - ext/nokogiri/include/libexslt/exsltconfig.h
325
325
  - ext/nokogiri/include/libexslt/exsltexports.h
326
- - ext/nokogiri/include/libxml2/libxml/DOCBparser.h
327
326
  - ext/nokogiri/include/libxml2/libxml/HTMLparser.h
328
327
  - ext/nokogiri/include/libxml2/libxml/HTMLtree.h
329
328
  - ext/nokogiri/include/libxml2/libxml/SAX.h
@@ -1,96 +0,0 @@
1
- /*
2
- * Summary: old DocBook SGML parser
3
- * Description: interface for a DocBook SGML non-verifying parser
4
- * This code is DEPRECATED, and should not be used anymore.
5
- *
6
- * Copy: See Copyright for the status of this software.
7
- *
8
- * Author: Daniel Veillard
9
- */
10
-
11
- #ifndef __DOCB_PARSER_H__
12
- #define __DOCB_PARSER_H__
13
- #include <libxml/xmlversion.h>
14
-
15
- #ifdef LIBXML_DOCB_ENABLED
16
-
17
- #include <libxml/parser.h>
18
- #include <libxml/parserInternals.h>
19
-
20
- #ifndef IN_LIBXML
21
- #ifdef __GNUC__
22
- #warning "The DOCBparser module has been deprecated in libxml2-2.6.0"
23
- #endif
24
- #endif
25
-
26
- #ifdef __cplusplus
27
- extern "C" {
28
- #endif
29
-
30
- /*
31
- * Most of the back-end structures from XML and SGML are shared.
32
- */
33
- typedef xmlParserCtxt docbParserCtxt;
34
- typedef xmlParserCtxtPtr docbParserCtxtPtr;
35
- typedef xmlSAXHandler docbSAXHandler;
36
- typedef xmlSAXHandlerPtr docbSAXHandlerPtr;
37
- typedef xmlParserInput docbParserInput;
38
- typedef xmlParserInputPtr docbParserInputPtr;
39
- typedef xmlDocPtr docbDocPtr;
40
-
41
- /*
42
- * There is only few public functions.
43
- */
44
- XMLPUBFUN int XMLCALL
45
- docbEncodeEntities(unsigned char *out,
46
- int *outlen,
47
- const unsigned char *in,
48
- int *inlen, int quoteChar);
49
-
50
- XMLPUBFUN docbDocPtr XMLCALL
51
- docbSAXParseDoc (xmlChar *cur,
52
- const char *encoding,
53
- docbSAXHandlerPtr sax,
54
- void *userData);
55
- XMLPUBFUN docbDocPtr XMLCALL
56
- docbParseDoc (xmlChar *cur,
57
- const char *encoding);
58
- XMLPUBFUN docbDocPtr XMLCALL
59
- docbSAXParseFile (const char *filename,
60
- const char *encoding,
61
- docbSAXHandlerPtr sax,
62
- void *userData);
63
- XMLPUBFUN docbDocPtr XMLCALL
64
- docbParseFile (const char *filename,
65
- const char *encoding);
66
-
67
- /**
68
- * Interfaces for the Push mode.
69
- */
70
- XMLPUBFUN void XMLCALL
71
- docbFreeParserCtxt (docbParserCtxtPtr ctxt);
72
- XMLPUBFUN docbParserCtxtPtr XMLCALL
73
- docbCreatePushParserCtxt(docbSAXHandlerPtr sax,
74
- void *user_data,
75
- const char *chunk,
76
- int size,
77
- const char *filename,
78
- xmlCharEncoding enc);
79
- XMLPUBFUN int XMLCALL
80
- docbParseChunk (docbParserCtxtPtr ctxt,
81
- const char *chunk,
82
- int size,
83
- int terminate);
84
- XMLPUBFUN docbParserCtxtPtr XMLCALL
85
- docbCreateFileParserCtxt(const char *filename,
86
- const char *encoding);
87
- XMLPUBFUN int XMLCALL
88
- docbParseDocument (docbParserCtxtPtr ctxt);
89
-
90
- #ifdef __cplusplus
91
- }
92
- #endif
93
-
94
- #endif /* LIBXML_DOCB_ENABLED */
95
-
96
- #endif /* __DOCB_PARSER_H__ */