From ed41bb67eb9aa487c90832dcb4ac7ad896122aae Mon Sep 17 00:00:00 2001 From: Charlie Savage Date: Mon, 11 Mar 2024 21:26:51 -0700 Subject: [PATCH 1/3] Version 5.0.3 --- HISTORY | 4 ++++ ext/libxml/ruby_xml_version.h | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/HISTORY b/HISTORY index cddddefb..c5736fef 100644 --- a/HISTORY +++ b/HISTORY @@ -1,5 +1,9 @@ = Release History +== 5.0.3 / 2024-03-11 + +* Update xmlStructuredErrorFunc to be backwards compatible + == 5.0.2 / 2024-01-08 * Fix broken DTD creation (DTD name is not required) diff --git a/ext/libxml/ruby_xml_version.h b/ext/libxml/ruby_xml_version.h index 7998ffc7..5738e2e3 100644 --- a/ext/libxml/ruby_xml_version.h +++ b/ext/libxml/ruby_xml_version.h @@ -1,9 +1,9 @@ /* Don't nuke this block! It is used for automatically updating the * versions below. VERSION = string formatting, VERNUM = numbered * version for inline testing: increment both or none at all.*/ -#define RUBY_LIBXML_VERSION "5.0.2" -#define RUBY_LIBXML_VERNUM 502 +#define RUBY_LIBXML_VERSION "5.0.3" +#define RUBY_LIBXML_VERNUM 503 #define RUBY_LIBXML_VER_MAJ 5 #define RUBY_LIBXML_VER_MIN 0 -#define RUBY_LIBXML_VER_MIC 2 +#define RUBY_LIBXML_VER_MIC 3 #define RUBY_LIBXML_VER_PATCH 0 From 07c88e8dab7c9d39128a7b8f2fabb5032b3f74ee Mon Sep 17 00:00:00 2001 From: David Date: Mon, 7 Oct 2024 10:29:06 +0100 Subject: [PATCH 2/3] Allow DTD system and internal to be null --- ext/libxml/ruby_xml_dtd.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/ext/libxml/ruby_xml_dtd.c b/ext/libxml/ruby_xml_dtd.c index 46dbe5fd..e5c6ca12 100644 --- a/ext/libxml/ruby_xml_dtd.c +++ b/ext/libxml/ruby_xml_dtd.c @@ -129,14 +129,14 @@ static VALUE rxml_dtd_type(VALUE self) * XML::Dtd.new(external_id, system_id, name, document, internal) -> dtd * * Create a new Dtd from the specified public and system identifiers: - * + * * * The first usage creates a DTD from a string and requires 1 parameter. * * The second usage loads and parses an external DTD and requires 2 parameters. * * The third usage creates a new internal or external DTD and requires 2 parameters and 3 optional parameters. * The DTD is then attached to the specified document if it is not nil. - * + * * Parameters: - * + * * dtd_string - A string that contains a complete DTD * external_id - A string that specifies the DTD's external name. For example, "-//W3C//DTD XHTML 1.0 Transitional//EN" * system_id - A string that specififies the DTD's system name. For example, "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" @@ -162,11 +162,17 @@ static VALUE rxml_dtd_initialize(int argc, VALUE *argv, VALUE self) VALUE name, doc, internal; rb_scan_args(argc, argv, "23", &external, &system, &name, &doc, &internal); - Check_Type(external, T_STRING); - xpublic = (const xmlChar*) StringValuePtr(external); + if (external != Qnil) + { + Check_Type(external, T_STRING); + xpublic = (const xmlChar*) StringValuePtr(external); + } - Check_Type(system, T_STRING); - xsystem = (const xmlChar*) StringValuePtr(system); + if (system != Qnil) + { + Check_Type(system, T_STRING); + xsystem = (const xmlChar*) StringValuePtr(system); + } if (name != Qnil) { From 28d33f48f010ef1af8d17c2dffb90bceaf52f4fb Mon Sep 17 00:00:00 2001 From: David Date: Mon, 7 Oct 2024 10:31:28 +0100 Subject: [PATCH 3/3] Version 5.0.4 --- ext/libxml/ruby_xml_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/libxml/ruby_xml_version.h b/ext/libxml/ruby_xml_version.h index 5738e2e3..9864aecd 100644 --- a/ext/libxml/ruby_xml_version.h +++ b/ext/libxml/ruby_xml_version.h @@ -1,8 +1,8 @@ /* Don't nuke this block! It is used for automatically updating the * versions below. VERSION = string formatting, VERNUM = numbered * version for inline testing: increment both or none at all.*/ -#define RUBY_LIBXML_VERSION "5.0.3" -#define RUBY_LIBXML_VERNUM 503 +#define RUBY_LIBXML_VERSION "5.0.4" +#define RUBY_LIBXML_VERNUM 504 #define RUBY_LIBXML_VER_MAJ 5 #define RUBY_LIBXML_VER_MIN 0 #define RUBY_LIBXML_VER_MIC 3