FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add python buffer api support by thesn10 · Pull Request #980 · pythonnet/pythonnet · GitHub

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .cs  (1) .md  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
2 changes: 1 addition & 1 deletion CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
## [Unreleased][]

### Added
- Added Python 3 buffer api support and PyBuffer interface for fast byte and numpy array read/write ([#980][p980])

### Changed
- Drop support for Python 2, 3.4, and 3.5
Expand Down Expand Up @@ -51,7 +52,6 @@ This version improves performance on benchmarks significantly compared to 2.3.
- Support for Python 3.8
- Codecs as the designated way to handle automatic conversions between
.NET and Python types
- Added Python 3 buffer api support and PyBuffer interface for fast byte and numpy array read/write ([#980][p980])

### Changed

Expand Down
2 changes: 2 additions & 0 deletions src/runtime/runtime.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -1154,6 +1154,8 @@ internal static long PyObject_Size(IntPtr pointer)
//====================================================================
// Python buffer API
//====================================================================
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
internal static extern int PyObject_CheckBuffer(IntPtr obj);

[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
internal static extern int PyObject_GetBuffer(IntPtr exporter, ref Py_buffer view, int flags);
Expand Down

Back | FazBrowse Home | New Git URL