TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ALL
from: DENNIS LEE BIEBER
date: 2019-12-03 11:30:00
subject: Re: RPi.GPIO-0.7.0 - a fe

On Tue, 3 Dec 2019 08:01:13 +0100, "R.Wieser" 
declaimed the following:

>
>As far as I can (now) tell, the "PWMType.tp_new = PyType_GenericNew;" line
>creates a single instance and stores it, which than is referenced in all

 Neither... cf: https://docs.python.org/3/c-api/type.html (and related)
"""
 newfunc PyTypeObject.tp_new

    An optional pointer to an instance creation function.
"""
"""
PyObject* PyType_GenericNew(PyTypeObject *type, PyObject *args, PyObject
*kwds)
    Return value: New reference.

    Generic handler for the tp_new slot of a type object. Create a new
instance using the type’s tp_alloc slot.
"""

 It appears to be saving "genericnew" AS the function to be used later
when the instance is actually created. Somewhere (possibly in the C
extension API itself) PWMType.tp_new needs to be called (with arguments) to
actually make the object.




--
 Wulfraed                 Dennis Lee Bieber         AF6VN
 wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.