1 Star 0 Fork 44

BruceGW/libxml2

forked from src-openEuler/libxml2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-xpath-Remove-remaining-references-to-valueFrame.patch 1.71 KB
一键复制 编辑 原始数据 按行查看 历史
谢志鹏 提交于 2023-12-31 21:55 . backport upstream patches
From fa993130f91a09c5b8d1454514a4ad44dd54f116 Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Sun, 30 Apr 2023 12:57:09 +0200
Subject: [PATCH] xpath: Remove remaining references to valueFrame
Fixes #529.
---
include/libxml/xpath.h | 2 +-
include/libxml/xpathInternals.h | 2 +-
xpointer.c | 1 -
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/include/libxml/xpath.h b/include/libxml/xpath.h
index b57985a2..6dae0780 100644
--- a/include/libxml/xpath.h
+++ b/include/libxml/xpath.h
@@ -400,7 +400,7 @@ struct _xmlXPathParserContext {
int xptr; /* it this an XPointer expression */
xmlNodePtr ancestor; /* used for walking preceding axis */
- int valueFrame; /* unused */
+ int valueFrame; /* always zero for compatibility */
};
/************************************************************************
diff --git a/include/libxml/xpathInternals.h b/include/libxml/xpathInternals.h
index cb0991d7..870055f9 100644
--- a/include/libxml/xpathInternals.h
+++ b/include/libxml/xpathInternals.h
@@ -297,7 +297,7 @@ XMLPUBFUN void *
if (ctxt == NULL) return; \
if (nargs != (x)) \
XP_ERROR(XPATH_INVALID_ARITY); \
- if (ctxt->valueNr < ctxt->valueFrame + (x)) \
+ if (ctxt->valueNr < (x)) \
XP_ERROR(XPATH_STACK_ERROR);
/**
diff --git a/xpointer.c b/xpointer.c
index d8c18d7a..73514215 100644
--- a/xpointer.c
+++ b/xpointer.c
@@ -1248,7 +1248,6 @@ xmlXPtrEvalXPointer(xmlXPathParserContextPtr ctxt) {
ctxt->valueNr = 0;
ctxt->valueMax = 10;
ctxt->value = NULL;
- ctxt->valueFrame = 0;
}
SKIP_BLANKS;
if (CUR == '/') {
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/BruceGW/libxml2.git
git@gitee.com:BruceGW/libxml2.git
BruceGW
libxml2
libxml2
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385