A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2002-July/026970.html below:

[Python-Dev] pre-PEP: The Safe Buffer Interface

[Python-Dev] pre-PEP: The Safe Buffer Interface [Python-Dev] pre-PEP: The Safe Buffer InterfaceNeil Hodgson nhodgson@bigpond.net.au
Sat, 27 Jul 2002 10:51:39 +1000
Thomas Heller:

>     The size and pointer returned must be valid as long as the object
>     is alive (has a positive reference count).  So, only objects which
>     never reallocate or resize the memory block are allowed to
>     implement this interface.

   I'd prefer an interface that allows for reallocation but has an explicit
locked state during which the buffer must stay still. My motivation comes
from the data structures implemented in Scintilla (an editor component),
which could be exposed through this buffer interface to other code. The most
important type in Scintilla (as in many editors) is a split (or gapped)
buffer. Upon receiving a lock call, it could collapse the gap and return a
stable pointer to its contents and then revert to its normal behaviour on
receiving an unlock.

   Neil





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4