-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
19 changed files
with
1,886 additions
and
240 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* PickleBuffer object. This is built-in for ease of use from third-party | ||
* C extensions. | ||
*/ | ||
|
||
#ifndef Py_PICKLEBUFOBJECT_H | ||
#define Py_PICKLEBUFOBJECT_H | ||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#ifndef Py_LIMITED_API | ||
|
||
PyAPI_DATA(PyTypeObject) PyPickleBuffer_Type; | ||
|
||
#define PyPickleBuffer_Check(op) (Py_TYPE(op) == &PyPickleBuffer_Type) | ||
|
||
/* Create a PickleBuffer redirecting to the given buffer-enabled object */ | ||
PyAPI_FUNC(PyObject *) PyPickleBuffer_FromObject(PyObject *); | ||
/* Get the PickleBuffer's underlying view to the original object | ||
* (NULL if released) | ||
*/ | ||
PyAPI_FUNC(const Py_buffer *) PyPickleBuffer_GetBuffer(PyObject *); | ||
/* Release the PickleBuffer. Returns 0 on success, -1 on error. */ | ||
PyAPI_FUNC(int) PyPickleBuffer_Release(PyObject *); | ||
|
||
#endif /* !Py_LIMITED_API */ | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
#endif /* !Py_PICKLEBUFOBJECT_H */ |
This file contains 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
Oops, something went wrong.