Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
0f46ffdb
Kaydet (Commit)
0f46ffdb
authored
Agu 26, 2009
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
the old buffer object doesn't exist in Python 3 #6659
üst
f3b33221
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
buffer.rst
Doc/c-api/buffer.rst
+15
-5
No files found.
Doc/c-api/buffer.rst
Dosyayı görüntüle @
0f46ffdb
...
@@ -10,7 +10,6 @@ Buffer Objects
...
@@ -10,7 +10,6 @@ Buffer Objects
.. index::
.. index::
object: buffer
single: buffer interface
single: buffer interface
Python objects implemented in C can export a "buffer interface." These
Python objects implemented in C can export a "buffer interface." These
...
@@ -297,14 +296,25 @@ Buffer related functions
...
@@ -297,14 +296,25 @@ Buffer related functions
length. Return 0 on success and -1 (with raising an error) on error.
length. Return 0 on success and -1 (with raising an error) on error.
.. index::
object: memoryview
MemoryView objects
MemoryView objects
==================
==================
A memoryview object is an extended buffer object that could replace the buffer
A memoryview object exposes the C level buffer interface to Python.
object (but doesn't have to as that could be kept as a simple 1-d memoryview
object). It, unlike :ctype:`Py_buffer`, is a Python object (exposed as
:class:`memoryview` in :mod:`builtins`), so it can be used with Python code.
.. cfunction:: PyObject* PyMemoryView_FromObject(PyObject *obj)
.. cfunction:: PyObject* PyMemoryView_FromObject(PyObject *obj)
Return a memoryview object from an object that defines the buffer interface.
Return a memoryview object from an object that defines the buffer interface.
.. cfunction:: PyObject * PyMemoryView_GetContiguous(PyObject *obj, int buffertype, char order)
Return a memoryview object to a contiguous chunk of memory (in either
'C' or 'F'ortran order) from an object that defines the buffer
interface. If memory is contiguous, the memoryview object points to the
original memory. Otherwise copy is made and the memoryview points to a
new bytes object.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment