Skip to content

"联系的内存区域" -> "连续的内存区域" #216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 21, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
代码的关键点在于 ``PyBuffer_GetBuffer()`` 函数。
给定一个任意的Python对象,它会试着去获取底层内存信息,它简单的抛出一个异常并返回-1.
传给 ``PyBuffer_GetBuffer()`` 的特殊标志给出了所需的内存缓冲类型。
例如,``PyBUF_ANY_CONTIGUOUS`` 表示是一个联系的内存区域
例如,``PyBUF_ANY_CONTIGUOUS`` 表示是一个连续的内存区域

对于数组、字节字符串和其他类似对象而言,一个 ``Py_buffer`` 结构体包含了所有底层内存的信息。
它包含一个指向内存地址、大小、元素大小、格式和其他细节的指针。下面是这个结构体的定义:
Expand Down