HEX
Server: nginx/1.24.0
System: Linux DGT-WORDPRESS-VM-SERVER 6.14.0-1014-azure #14~24.04.1-Ubuntu SMP Fri Oct 3 20:52:11 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 8.4.12
Disabled: NONE
Upload Files
File: //usr/include/Imath/PyImathBufferProtocol.h
//
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenEXR Project.
//

// clang-format off

#ifndef _PyImathBufferProtocol_h_
#define _PyImathBufferProtocol_h_

#define BOOST_BIND_GLOBAL_PLACEHOLDERS
#include <boost/python.hpp>

namespace PyImath {

//  For more information on working with the protocol see:
//
//    https://docs.python.org/2.7/c-api/buffer.html
//    https://docs.python.org/3.7.10/c-api/buffer.html

template <class T>
void add_buffer_protocol (boost::python::class_<T> &classObj);

template <class ArrayT>
ArrayT* fixedArrayFromBuffer (PyObject *obj);

}

#endif