[pypy-svn] r73965 - pypy/branch/cpython-extension/pypy/module/cpyext
afa at codespeak.net
afa at codespeak.net
Thu Apr 22 13:07:06 CEST 2010
Author: afa
Date: Thu Apr 22 13:07:03 2010
New Revision: 73965
Modified:
pypy/branch/cpython-extension/pypy/module/cpyext/stubs.py
Log:
Remove from stubs some recently added functions
Modified: pypy/branch/cpython-extension/pypy/module/cpyext/stubs.py
==============================================================================
--- pypy/branch/cpython-extension/pypy/module/cpyext/stubs.py (original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/stubs.py Thu Apr 22 13:07:03 2010
@@ -3015,42 +3015,6 @@
"""
raise NotImplementedError
- at cpython_api([], {PyGILState_STATE})
-def PyGILState_Ensure(space, ):
- """Ensure that the current thread is ready to call the Python C API regardless
- of the current state of Python, or of the global interpreter lock. This may
- be called as many times as desired by a thread as long as each call is
- matched with a call to PyGILState_Release(). In general, other
- thread-related APIs may be used between PyGILState_Ensure() and
- PyGILState_Release() calls as long as the thread state is restored to
- its previous state before the Release(). For example, normal usage of the
- Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS macros is
- acceptable.
-
- The return value is an opaque "handle" to the thread state when
- PyGILState_Ensure() was called, and must be passed to
- PyGILState_Release() to ensure Python is left in the same state. Even
- though recursive calls are allowed, these handles cannot be shared - each
- unique call to PyGILState_Ensure() must save the handle for its call
- to PyGILState_Release().
-
- When the function returns, the current thread will hold the GIL. Failure is a
- fatal error.
- """
- raise NotImplementedError
-
- at cpython_api([{PyGILState_STATE}], lltype.Void)
-def PyGILState_Release(space, ):
- """Release any resources previously acquired. After this call, Python's state will
- be the same as it was prior to the corresponding PyGILState_Ensure() call
- (but generally this state will be unknown to the caller, hence the use of the
- GILState API.)
-
- Every call to PyGILState_Ensure() must be matched by a call to
- PyGILState_Release() on the same thread.
- """
- raise NotImplementedError
-
@cpython_api([{int (*func)(void*}, {void*}], lltype.Void)
def Py_AddPendingCall(space, , arg)):
"""
@@ -3579,12 +3543,6 @@
For values outside 0..LONG_MAX, both signed and unsigned integers are accepted."""
raise NotImplementedError
- at cpython_api([PyObject], rffi.INT_real)
-def PyMapping_Check(space, o):
- """Return 1 if the object provides mapping protocol, and 0 otherwise. This
- function always succeeds."""
- raise NotImplementedError
-
@cpython_api([PyObject], Py_ssize_t)
def PyMapping_Size(space, o):
"""
@@ -3631,13 +3589,6 @@
NULL. This is equivalent to the Python expression o.values()."""
raise NotImplementedError
- at cpython_api([PyObject], PyObject)
-def PyMapping_Items(space, o):
- """On success, return a list of the items in object o, where each item is a tuple
- containing a key-value pair. On failure, return NULL. This is equivalent to
- the Python expression o.items()."""
- raise NotImplementedError
-
@cpython_api([PyObject, rffi.CCHARP], PyObject)
def PyMapping_GetItemString(space, o, key):
"""Return element of o corresponding to the object key or NULL on failure.
More information about the Pypy-commit
mailing list