PNG  IHDR  8] PLTE S =tRNS   PNG  IHDR  8] PLTE S =tRNS   REDROOM
PHP 7.4.33
Preview: pybuffer.h Size: 5.00 KB
//opt/alt/python311/include/python3.11/pybuffer.h

/* Public Py_buffer API */

#ifndef Py_BUFFER_H
#define Py_BUFFER_H
#ifdef __cplusplus
extern "C" {
#endif

#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030b0000

/* === New Buffer API ============================================
 * Limited API and stable ABI since Python 3.11
 *
 * Py_buffer struct layout and size is now part of the stable abi3. The
 * struct layout and size must not be changed in any way, as it would
 * break the ABI.
 *
 */

typedef struct {
    void *buf;
    PyObject *obj;        /* owned reference */
    Py_ssize_t len;
    Py_ssize_t itemsize;  /* This is Py_ssize_t so it can be
                             pointed to by strides in simple case.*/
    int readonly;
    int ndim;
    char *format;
    Py_ssize_t *shape;
    Py_ssize_t *strides;
    Py_ssize_t *suboffsets;
    void *internal;
} Py_buffer;

/* Return 1 if the getbuffer function is available, otherwise return 0. */
PyAPI_FUNC(int) PyObject_CheckBuffer(PyObject *obj);

/* This is a C-API version of the getbuffer function call.  It checks
   to make sure object has the required function pointer and issues the
   call.

   Returns -1 and raises an error on failure and returns 0 on success. */
PyAPI_FUNC(int) PyObject_GetBuffer(PyObject *obj, Py_buffer *view,
                                   int flags);

/* Get the memory area pointed to by the indices for the buffer given.
   Note that view->ndim is the assumed size of indices. */
PyAPI_FUNC(void *) PyBuffer_GetPointer(const Py_buffer *view, const Py_ssize_t *indices);

/* Return the implied itemsize of the data-format area from a
   struct-style description. */
PyAPI_FUNC(Py_ssize_t) PyBuffer_SizeFromFormat(const char *format);

/* Implementation in memoryobject.c */
PyAPI_FUNC(int) PyBuffer_ToContiguous(void *buf, const Py_buffer *view,
                                      Py_ssize_t len, char order);

PyAPI_FUNC(int) PyBuffer_FromContiguous(const Py_buffer *view, const void *buf,
                                        Py_ssize_t len, char order);

/* Copy len bytes of data from the contiguous chunk of memory
   pointed to by buf into the buffer exported by obj.  Return
   0 on success and return -1 and raise a PyBuffer_Error on
   error (i.e. the object does not have a buffer interface or
   it is not working).

   If fort is 'F', then if the object is multi-dimensional,
   then the data will be copied into the array in
   Fortran-style (first dimension varies the fastest).  If
   fort is 'C', then the data will be copied into the array
   in C-style (last dimension varies the fastest).  If fort
   is 'A', then it does not matter and the copy will be made
   in whatever way is more efficient. */
PyAPI_FUNC(int) PyObject_CopyData(PyObject *dest, PyObject *src);

/* Copy the data from the src buffer to the buffer of destination. */
PyAPI_FUNC(int) PyBuffer_IsContiguous(const Py_buffer *view, char fort);

/*Fill the strides array with byte-strides of a contiguous
  (Fortran-style if fort is 'F' or C-style otherwise)
  array of the given shape with the given number of bytes
  per element. */
PyAPI_FUNC(void) PyBuffer_FillContiguousStrides(int ndims,
                                               Py_ssize_t *shape,
                                               Py_ssize_t *strides,
                                               int itemsize,
                                               char fort);

/* Fills in a buffer-info structure correctly for an exporter
   that can only share a contiguous chunk of memory of
   "unsigned bytes" of the given length.

   Returns 0 on success and -1 (with raising an error) on error. */
PyAPI_FUNC(int) PyBuffer_FillInfo(Py_buffer *view, PyObject *o, void *buf,
                                  Py_ssize_t len, int readonly,
                                  int flags);

/* Releases a Py_buffer obtained from getbuffer ParseTuple's "s*". */
PyAPI_FUNC(void) PyBuffer_Release(Py_buffer *view);

/* Maximum number of dimensions */
#define PyBUF_MAX_NDIM 64

/* Flags for getting buffers */
#define PyBUF_SIMPLE 0
#define PyBUF_WRITABLE 0x0001

#ifndef Py_LIMITED_API
/*  we used to include an E, backwards compatible alias */
#define PyBUF_WRITEABLE PyBUF_WRITABLE
#endif

#define PyBUF_FORMAT 0x0004
#define PyBUF_ND 0x0008
#define PyBUF_STRIDES (0x0010 | PyBUF_ND)
#define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
#define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
#define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
#define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)

#define PyBUF_CONTIG (PyBUF_ND | PyBUF_WRITABLE)
#define PyBUF_CONTIG_RO (PyBUF_ND)

#define PyBUF_STRIDED (PyBUF_STRIDES | PyBUF_WRITABLE)
#define PyBUF_STRIDED_RO (PyBUF_STRIDES)

#define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_WRITABLE | PyBUF_FORMAT)
#define PyBUF_RECORDS_RO (PyBUF_STRIDES | PyBUF_FORMAT)

#define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_WRITABLE | PyBUF_FORMAT)
#define PyBUF_FULL_RO (PyBUF_INDIRECT | PyBUF_FORMAT)


#define PyBUF_READ  0x100
#define PyBUF_WRITE 0x200

#endif /* !Py_LIMITED_API || Py_LIMITED_API >= 3.11 */

#ifdef __cplusplus
}
#endif
#endif /* Py_BUFFER_H */

Directory Contents

Dirs: 2 × Files: 74

Name Size Perms Modified Actions
cpython DIR
- drwxr-xr-x 2026-06-04 10:22:34
Edit Download
internal DIR
- drwxr-xr-x 2026-06-04 10:22:34
Edit Download
30.67 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
264 B lrw-r--r-- 2026-03-03 00:52:57
Edit Download
1.18 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
1.43 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
2.56 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
6.11 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
6.91 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
520 B lrw-r--r-- 2026-03-03 00:52:57
Edit Download
724 B lrw-r--r-- 2026-03-03 00:52:57
Edit Download
9.41 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
1.23 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
3.76 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
21.94 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
253 B lrw-r--r-- 2026-03-03 00:52:57
Edit Download
1.74 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
1.07 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
1.53 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
507 B lrw-r--r-- 2026-03-03 00:52:57
Edit Download
1.49 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
336 B lrw-r--r-- 2026-03-03 00:52:57
Edit Download
334 B lrw-r--r-- 2026-03-03 00:52:57
Edit Download
2.95 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
772 B lrw-r--r-- 2026-03-03 00:52:57
Edit Download
593 B lrw-r--r-- 2026-03-03 00:52:57
Edit Download
1.74 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
3.65 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
827 B lrw-r--r-- 2026-03-03 00:52:57
Edit Download
2.74 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
4.95 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
6.39 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
2.32 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
29.10 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
8.23 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
10.92 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
737 B lrw-r--r-- 2026-03-03 00:52:57
Edit Download
291 B lrw-r--r-- 2026-03-03 00:52:57
Edit Download
1.27 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
5.00 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
1.68 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
51.95 KB lrw-r--r-- 2026-04-17 12:21:39
Edit Download
162 B lrw-r--r-- 2026-04-17 12:36:42
Edit Download
2.36 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
12.48 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
2.78 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
551 B lrw-r--r-- 2026-03-03 00:52:57
Edit Download
4.06 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
2.20 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
2.92 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
5.92 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
1.93 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
3.80 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
23.88 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
4.53 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
436 B lrw-r--r-- 2026-03-03 00:52:57
Edit Download
1.52 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
2.79 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
1.16 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
4.72 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
851 B lrw-r--r-- 2026-03-03 00:52:57
Edit Download
2.41 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
628 B lrw-r--r-- 2026-03-03 00:52:57
Edit Download
1.51 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
2.46 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
1.99 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
1.36 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
1.35 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
2.61 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
583 B lrw-r--r-- 2026-03-03 00:52:57
Edit Download
1.09 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
1.58 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
2.29 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
35.19 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
1.10 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download
1.20 KB lrw-r--r-- 2026-03-03 00:52:57
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).
 !"#$%&'(()*+,-./00123456789 t\ wIDATx ]ys  47Y ƒ -  "  Rv  < f{Ɛ $k l L > L  ~h^ 1  [  r G t& h  l F z3O Y ! p A(_g̷ E8 )S 8 c  Kb"z ~ 5 J xAL WU <  *  5 m;W a pB h ~P J 2 3 6 ҙ .Ƹ P i  4g F R L P ΪK/D  M v (a3 k J Œ4N5* SH ` SdJ z  O J Xՠ V>u ߱ BE&L b2 ?2` tX+  c CB A$ i b C ĀMB E : /  # Dx &l =q Ty  0 \p I ( L Ǎ { e 4k ;`u^ヲ eP!( d {  )T A 8 O;Ě n >;s6 !  :Nx `[S D HU ~ q›J F} a g*D 49 / pn k h (t 8NxƐF _!r չ7 ZR R׷ q/5") Ӎ NY 0 x sZ!   o  fu  ,  K"$ ? pg  㕣=  1» {h " fh7    y  } € +7  $ y " X —ą - G P u 4 m >J 5 L =V ' ^@I p ?MS xЌ XV P ! h "C NS9B8̢ ]!K  e   zA , ӏkbY  !< XQ ٿyS| *" f { w  4@[S <  # 0 ! js [m  =,~ o "ݎ DHf Wo $ g ! Vԅ t mB /y Wf V4񺍸 c+@x?  B ~u " xUN e 0 BĂ) ~J pz! 7y6]l Ԥ@ P a< O /DHC `≻  N m"$  0ObB }{ x AO FCG D R ^ "B  { WDH  UR l@ T #  +"d T ; 0 i  D}. 7 ` ' ] w rE &S i ƕiTD EL P _ u h $ Ա FG wVD G L R Zf ' .!] J /ZR oGЍs Mr Ĥ ʬ 3 Q [3 cL ` ^ p + ( F;# B 5 '  2Y f [  ϶R0e }  E 7 6M aۮ H <& n % L] E}Up x紉, Uw' Q  Ǯշo k ވۙ 0N94 VX5 xEDE l D #֤ } C o )W :  ^ s 9  bRf iX5u ཱི 4 :[  T 1. | [E 2ؽ Iy\ : o x K G 5 ylP ' uK E ftb/i[3 .g _  [3M n G, #NwQ5~  ؚ) | n =Ц"x qg gB ` 듘 ~ x w ? ? R~  _ u. &VQ K˻   H C ( TN˄+ `C dA nB׭ D 3"Z G ê ^k H_ /- ~ " R_  .8 Z_ 6@ o  xg  uP ? 3լ @7AM!  E7^ - =V L  x  g-D0  CtmW 7  O  G _ WD0 g C  w1 r d w : a | \  *" f nֳ ^ H# f L ` Z ۽hV  }S F r0Ù Bć5r] @! NL iQ]{s^=4 d  WD  "  "   M; t" 8 5 e dL| "-*st" ) SWD ?R[S e ooF  20.D ? bo =) A i o d ģ ZҰaO @E =) i D a &ܟa CϞ y6 ,<%{^x%{f8? `iw^ ?/ M * IEND B`