Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b547979

Browse files
committed
Merged revisions 68568,68665 via svnmerge from
svn+ssh://[email protected]/python/trunk ........ r68568 | georg.brandl | 2009-01-13 02:11:07 -0600 (Tue, 13 Jan 2009) | 2 lines Fix call signature and markup. ........ r68665 | amaury.forgeotdarc | 2009-01-17 11:11:50 -0600 (Sat, 17 Jan 2009) | 3 lines #4930: Slightly cleaner (and faster) code in type creation: compare slots by address, not by name. ........
1 parent 9a0fc97 commit b547979

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

Doc/c-api/init.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -782,13 +782,13 @@ from a worker thread and the actual call than made at the earliest
782782
convenience by the main thread where it has possession of the global
783783
interpreter lock and can perform any Python API calls.
784784

785-
.. cfunction:: void Py_AddPendingCall( int (*func)(void *), void *arg) )
785+
.. cfunction:: void Py_AddPendingCall( int (*func)(void *, void *arg) )
786786

787787
.. index:: single: Py_AddPendingCall()
788788

789789
Post a notification to the Python main thread. If successful,
790-
\*:attr`func` will be called with the argument :attr:`arg` at the earliest
791-
convenience. \*:attr:`func` will be called having the global interpreter
790+
*func* will be called with the argument *arg* at the earliest
791+
convenience. *func* will be called having the global interpreter
792792
lock held and can thus use the full Python API and can take any
793793
action such as setting object attributes to signal IO completion.
794794
It must return 0 on success, or -1 signalling an exception.

Objects/typeobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5650,7 +5650,7 @@ update_one_slot(PyTypeObject *type, slotdef *p)
56505650
else if (Py_TYPE(descr) == &PyCFunction_Type &&
56515651
PyCFunction_GET_FUNCTION(descr) ==
56525652
(PyCFunction)tp_new_wrapper &&
5653-
strcmp(p->name, "__new__") == 0)
5653+
ptr == (void**)&type->tp_new)
56545654
{
56555655
/* The __new__ wrapper is not a wrapper descriptor,
56565656
so must be special-cased differently.
@@ -5670,7 +5670,7 @@ update_one_slot(PyTypeObject *type, slotdef *p)
56705670
point out a bug in this reasoning a beer. */
56715671
}
56725672
else if (descr == Py_None &&
5673-
strcmp(p->name, "__hash__") == 0) {
5673+
ptr == (void**)&type->tp_hash) {
56745674
/* We specifically allow __hash__ to be set to None
56755675
to prevent inheritance of the default
56765676
implementation from object.__hash__ */

0 commit comments

Comments
 (0)