是Python的ctypes.c_long 64位在64位系统? [英] Is Python's ctypes.c_long 64 bit on 64 bit systems?

查看:666
本文介绍了是Python的ctypes.c_long 64位在64位系统?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C,长为64位在64位系统。难道这反映在Python的 ctypes的模块?

In C, long is 64 bit on a 64 bit system. Is this reflected in Python's ctypes module?

推荐答案

的尺寸长取决于内存模型。在Windows(LLP64)是32位,在UNIX(LP64),它是64位的。

The size of long depends on the memory model. On Windows (LLP64) it is 32-bit, on UNIX (LP64) it is 64-bit.

如果你需要一个64位整数,使用 c_int64

If you need a 64-bit integer, use c_int64.

如果你需要一个指针大小的整数,使用 c_void_p (以下简称价值重新presented为整)。

If you need a pointer-sized integer, use c_void_p ("The value is represented as integer").

这篇关于是Python的ctypes.c_long 64位在64位系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆