代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/libvirt-python 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From d966561b118ce9fe159a9a47c3a120e8439004d0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
Date: Thu, 12 Nov 2020 14:31:54 +0000
Subject: [PATCH 6/6] Replace deprecated PyEval_CallObject with PyObject_Call
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The former is deprecated since Python 3.9, and the latter has existed
for all 3.x and probably before.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
libvirt-override.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/libvirt-override.c b/libvirt-override.c
index 00efe7f..d1f3ac0 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -1856,7 +1856,7 @@ libvirt_virErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx,
VIR_PY_TUPLE_SET_GOTO(info, 8, libvirt_intWrap((long)err->int2), cleanup);
/* TODO pass conn and dom if available */
- result = PyEval_CallObject(libvirt_virPythonErrorFuncHandler, list);
+ result = PyObject_Call(libvirt_virPythonErrorFuncHandler, list, NULL);
Py_XDECREF(result);
}
@@ -1961,7 +1961,7 @@ virConnectCredCallbackWrapper(virConnectCredentialPtr cred,
VIR_PY_TUPLE_SET_GOTO(list, 1, pycbdata, cleanup);
PyErr_Clear();
- pyret = PyEval_CallObject(pycb, list);
+ pyret = PyObject_Call(pycb, list, NULL);
if (PyErr_Occurred()) {
PyErr_Print();
goto cleanup;
@@ -5505,7 +5505,7 @@ libvirt_virEventAddHandleFunc(int fd,
VIR_PY_TUPLE_SET_GOTO(cb_args, 1, libvirt_virVoidPtrWrap(opaque), cleanup);
VIR_PY_TUPLE_SET_GOTO(cb_args, 2, libvirt_virFreeCallbackWrap(ff), cleanup);
- result = PyEval_CallObject(addHandleObj, pyobj_args);
+ result = PyObject_Call(addHandleObj, pyobj_args, NULL);
if (!result) {
PyErr_Print();
PyErr_Clear();
@@ -5538,7 +5538,7 @@ libvirt_virEventUpdateHandleFunc(int watch,
VIR_PY_TUPLE_SET_GOTO(pyobj_args, 0, libvirt_intWrap(watch), cleanup);
VIR_PY_TUPLE_SET_GOTO(pyobj_args, 1, libvirt_intWrap(event), cleanup);
- result = PyEval_CallObject(updateHandleObj, pyobj_args);
+ result = PyObject_Call(updateHandleObj, pyobj_args, NULL);
if (!result) {
PyErr_Print();
PyErr_Clear();
@@ -5566,7 +5566,7 @@ libvirt_virEventRemoveHandleFunc(int watch)
VIR_PY_TUPLE_SET_GOTO(pyobj_args, 0, libvirt_intWrap(watch), cleanup);
- result = PyEval_CallObject(removeHandleObj, pyobj_args);
+ result = PyObject_Call(removeHandleObj, pyobj_args, NULL);
if (result) {
retval = 0;
} else {
@@ -5623,7 +5623,7 @@ libvirt_virEventAddTimeoutFunc(int timeout,
VIR_PY_TUPLE_SET_GOTO(cb_args, 1, libvirt_virVoidPtrWrap(opaque), cleanup);
VIR_PY_TUPLE_SET_GOTO(cb_args, 2, libvirt_virFreeCallbackWrap(ff), cleanup);
- result = PyEval_CallObject(addTimeoutObj, pyobj_args);
+ result = PyObject_Call(addTimeoutObj, pyobj_args, NULL);
if (!result) {
PyErr_Print();
PyErr_Clear();
@@ -5654,7 +5654,7 @@ libvirt_virEventUpdateTimeoutFunc(int timer,
VIR_PY_TUPLE_SET_GOTO(pyobj_args, 0, libvirt_intWrap(timer), cleanup);
VIR_PY_TUPLE_SET_GOTO(pyobj_args, 1, libvirt_intWrap(timeout), cleanup);
- result = PyEval_CallObject(updateTimeoutObj, pyobj_args);
+ result = PyObject_Call(updateTimeoutObj, pyobj_args, NULL);
if (!result) {
PyErr_Print();
PyErr_Clear();
@@ -5681,7 +5681,7 @@ libvirt_virEventRemoveTimeoutFunc(int timer)
VIR_PY_TUPLE_SET_GOTO(pyobj_args, 0, libvirt_intWrap(timer), cleanup);
- result = PyEval_CallObject(removeTimeoutObj, pyobj_args);
+ result = PyObject_Call(removeTimeoutObj, pyobj_args, NULL);
if (result) {
retval = 0;
} else {
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。