Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
a3cf19e6
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a3cf19e6
编写于
11月 15, 2006
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix unsigned long wraparound in python binding
上级
6d8b20ce
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
2 deletion
+21
-2
ChangeLog
ChangeLog
+6
-0
python/libvir.c
python/libvir.c
+2
-2
python/libvirt_wrap.h
python/libvirt_wrap.h
+1
-0
python/types.c
python/types.c
+12
-0
未找到文件。
ChangeLog
浏览文件 @
a3cf19e6
Wed Nov 15 15:42:01 EST 2006 Daniel Berrange <berrange@redhat.com>
* python/libvir.c, python/libvirt_wrap.h, python/types.h: Ensure
that unsigned longs are marshalled to python Long type instead
of Int, to avoid 32-bit integer wraparound
Tue Nov 14 18:42:01 EST 2006 Daniel Berrange <berrange@redhat.com>
Tue Nov 14 18:42:01 EST 2006 Daniel Berrange <berrange@redhat.com>
* src/xend_internal.c: Added support for parsing non-bridge style
* src/xend_internal.c: Added support for parsing non-bridge style
...
...
python/libvir.c
浏览文件 @
a3cf19e6
...
@@ -261,8 +261,8 @@ libvirt_virDomainGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
...
@@ -261,8 +261,8 @@ libvirt_virDomainGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
}
}
py_retval
=
PyList_New
(
5
);
py_retval
=
PyList_New
(
5
);
PyList_SetItem
(
py_retval
,
0
,
libvirt_intWrap
((
int
)
info
.
state
));
PyList_SetItem
(
py_retval
,
0
,
libvirt_intWrap
((
int
)
info
.
state
));
PyList_SetItem
(
py_retval
,
1
,
libvirt_
longWrap
((
long
)
info
.
maxMem
));
PyList_SetItem
(
py_retval
,
1
,
libvirt_
ulongWrap
(
info
.
maxMem
));
PyList_SetItem
(
py_retval
,
2
,
libvirt_
longWrap
((
long
)
info
.
memory
));
PyList_SetItem
(
py_retval
,
2
,
libvirt_
ulongWrap
(
info
.
memory
));
PyList_SetItem
(
py_retval
,
3
,
libvirt_intWrap
((
int
)
info
.
nrVirtCpu
));
PyList_SetItem
(
py_retval
,
3
,
libvirt_intWrap
((
int
)
info
.
nrVirtCpu
));
PyList_SetItem
(
py_retval
,
4
,
PyList_SetItem
(
py_retval
,
4
,
libvirt_longlongWrap
((
unsigned
long
long
)
info
.
cpuTime
));
libvirt_longlongWrap
((
unsigned
long
long
)
info
.
cpuTime
));
...
...
python/libvirt_wrap.h
浏览文件 @
a3cf19e6
...
@@ -41,6 +41,7 @@ typedef struct {
...
@@ -41,6 +41,7 @@ typedef struct {
PyObject
*
libvirt_intWrap
(
int
val
);
PyObject
*
libvirt_intWrap
(
int
val
);
PyObject
*
libvirt_longWrap
(
long
val
);
PyObject
*
libvirt_longWrap
(
long
val
);
PyObject
*
libvirt_ulongWrap
(
unsigned
long
val
);
PyObject
*
libvirt_longlongWrap
(
long
long
val
);
PyObject
*
libvirt_longlongWrap
(
long
long
val
);
PyObject
*
libvirt_charPtrWrap
(
char
*
str
);
PyObject
*
libvirt_charPtrWrap
(
char
*
str
);
PyObject
*
libvirt_constcharPtrWrap
(
const
char
*
str
);
PyObject
*
libvirt_constcharPtrWrap
(
const
char
*
str
);
...
...
python/types.c
浏览文件 @
a3cf19e6
...
@@ -33,6 +33,18 @@ libvirt_longWrap(long val)
...
@@ -33,6 +33,18 @@ libvirt_longWrap(long val)
return
(
ret
);
return
(
ret
);
}
}
PyObject
*
libvirt_ulongWrap
(
unsigned
long
val
)
{
PyObject
*
ret
;
#ifdef DEBUG
printf
(
"libvirt_ulongWrap: val = %lu
\n
"
,
val
);
#endif
ret
=
PyLong_FromLong
(
val
);
return
(
ret
);
}
PyObject
*
PyObject
*
libvirt_longlongWrap
(
long
long
val
)
libvirt_longlongWrap
(
long
long
val
)
{
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录