HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PyImathBufferProtocol.h
Go to the documentation of this file.
1 //
2 // SPDX-License-Identifier: BSD-3-Clause
3 // Copyright Contributors to the OpenEXR Project.
4 //
5 
6 // clang-format off
7 
8 #ifndef _PyImathBufferProtocol_h_
9 #define _PyImathBufferProtocol_h_
10 
11 #define HBOOST_BIND_GLOBAL_PLACEHOLDERS
12 #include <hboost/python.hpp>
13 
14 namespace PyImath {
15 
16 // For more information on working with the protocol see:
17 //
18 // https://docs.python.org/2.7/c-api/buffer.html
19 // https://docs.python.org/3.7.10/c-api/buffer.html
20 
21 template <class T>
22 void add_buffer_protocol (hboost::python::class_<T> &classObj);
23 
24 template <class ArrayT>
25 ArrayT* fixedArrayFromBuffer (PyObject *obj);
26 
27 }
28 
29 #endif
ArrayT * fixedArrayFromBuffer(PyObject *obj)
void add_buffer_protocol(hboost::python::class_< T > &classObj)