/external/python/cpython3/Doc/extending/ |
D | newtypes_tutorial.rst | 95 .tp_new = PyType_GenericNew, 164 To enable object creation, we have to provide a :c:member:`~PyTypeObject.tp_new` 169 .tp_new = PyType_GenericNew, 272 *NULL* (which might happen here if ``tp_new`` failed midway). It then 286 strings, so we provide a ``tp_new`` implementation:: 309 and install it in the :c:member:`~PyTypeObject.tp_new` member:: 311 .tp_new = Custom_new, 313 The ``tp_new`` handler is responsible for creating (as opposed to initializing) 315 It is not required to define a ``tp_new`` member, and indeed many extension 317 version of the ``Custom`` type above. In this case, we use the ``tp_new`` [all …]
|
/external/python/cpython2/Doc/includes/ |
D | noddy.c | 44 noddy_NoddyType.tp_new = PyType_GenericNew; in initnoddy()
|
D | typestruct.h | 67 newfunc tp_new; member
|
/external/python/cpython2/Modules/_sqlite/ |
D | prepare_protocol.c | 81 pysqlite_PrepareProtocolType.tp_new = PyType_GenericNew; in pysqlite_prepare_protocol_setup_types()
|
D | cache.c | 365 pysqlite_NodeType.tp_new = PyType_GenericNew; in pysqlite_cache_setup_types() 366 pysqlite_CacheType.tp_new = PyType_GenericNew; in pysqlite_cache_setup_types()
|
D | row.c | 280 pysqlite_RowType.tp_new = pysqlite_row_new; in pysqlite_row_setup_types()
|
D | statement.c | 546 pysqlite_StatementType.tp_new = PyType_GenericNew; in pysqlite_statement_setup_types()
|
/external/python/cpython3/Modules/_sqlite/ |
D | prepare_protocol.c | 80 pysqlite_PrepareProtocolType.tp_new = PyType_GenericNew; in pysqlite_prepare_protocol_setup_types()
|
D | cache.c | 346 pysqlite_NodeType.tp_new = PyType_GenericNew; in pysqlite_cache_setup_types() 347 pysqlite_CacheType.tp_new = PyType_GenericNew; in pysqlite_cache_setup_types()
|
D | row.c | 277 pysqlite_RowType.tp_new = pysqlite_row_new; in pysqlite_row_setup_types()
|
D | statement.c | 496 pysqlite_StatementType.tp_new = PyType_GenericNew; in pysqlite_statement_setup_types()
|
/external/python/cpython3/Doc/includes/ |
D | custom.c | 15 .tp_new = PyType_GenericNew,
|
D | typestruct.h | 65 newfunc tp_new; member
|
D | custom2.c | 104 .tp_new = Custom_new,
|
D | custom3.c | 154 .tp_new = Custom_new,
|
D | custom4.c | 166 .tp_new = Custom_new,
|
/external/python/cpython2/Objects/ |
D | typeobject.c | 742 if (type->tp_new == NULL) { in type_call() 749 obj = type->tp_new(type, args, kwds); in type_call() 2161 if (winner->tp_new != type_new) /* Pass it to the winner */ in type_new() 2162 return winner->tp_new(winner, args, kwds); in type_new() 2984 type->tp_new != object_new) in object_init() 2991 type->tp_new == object_new) in object_init() 3006 if (type->tp_new != object_new && in object_new() 3013 else if (type->tp_new != object_new || in object_new() 3325 if (PyType_Check(cls) && ((PyTypeObject *)cls)->tp_new == NULL) { in reduce_2() 3868 if (type->tp_new == NULL) [all …]
|
/external/python/cpython3/Objects/ |
D | typeobject.c | 915 if (type->tp_new == NULL) { in type_call() 929 obj = type->tp_new(type, args, kwds); in type_call() 2427 if (winner->tp_new != type_new) /* Pass it to the winner */ in type_new() 2428 return winner->tp_new(winner, args, kwds); in type_new() 3661 if (type->tp_new == object_new) { in object_init() 3675 if (type->tp_new != object_new) { in object_new() 4398 if (Py_TYPE(obj)->tp_new == NULL) { in reduce_newobj() 4888 if (type->tp_new == NULL) in inherit_special() 4889 type->tp_new = base->tp_new; in inherit_special() 5900 while (staticbase && (staticbase->tp_new == slot_tp_new)) in tp_new_wrapper() [all …]
|
D | typeslots.inc | 66 offsetof(PyHeapTypeObject, ht_type.tp_new),
|
/external/python/cpython2/Modules/ |
D | xxmodule.c | 348 Null_Type.tp_new = PyType_GenericNew; in initxx()
|
/external/python/cpython3/Python/ |
D | context.c | 671 .tp_new = context_tp_new, 1007 .tp_new = contextvar_tp_new, 1141 .tp_new = token_tp_new,
|
/external/python/cpython2/Python/ |
D | sysmodule.c | 1498 VersionInfoType.tp_new = NULL; in _PySys_Init() 1506 FlagsType.tp_new = NULL; in _PySys_Init() 1515 WindowsVersionType.tp_new = NULL; in _PySys_Init()
|
/external/python/cpython2/Doc/extending/ |
D | newtypes.rst | 180 To enable object creation, we have to provide a :c:member:`~PyTypeObject.tp_new` implementation. 183 :c:member:`~PyTypeObject.tp_new` slot, but we can't, for portability sake, On some platforms or 185 defined in another C module, so, instead, we'll assign the :c:member:`~PyTypeObject.tp_new` slot 189 noddy_NoddyType.tp_new = PyType_GenericNew; 322 and install it in the :c:member:`~PyTypeObject.tp_new` member:: 324 Noddy_new, /* tp_new */ 349 If you are creating a co-operative :c:member:`~PyTypeObject.tp_new` (one that calls a base type's 350 :c:member:`~PyTypeObject.tp_new` or :meth:`__new__`), you must *not* try to determine what method 352 what type you are going to call, and call its :c:member:`~PyTypeObject.tp_new` directly, or via 353 ``type->tp_base->tp_new``. If you do not do this, Python subclasses of your [all …]
|
/external/python/cpython3/Doc/c-api/ |
D | type.rst | 88 Generic handler for the :c:member:`~PyTypeObject.tp_new` slot of a type object. Create a
|
/external/python/cpython2/Doc/c-api/ |
D | typeobj.rst | 515 …mber:`~PyTypeObject.tp_init`, :c:member:`~PyTypeObject.tp_alloc`, :c:member:`~PyTypeObject.tp_new`, 953 created normally by calling its type, after the type's :c:member:`~PyTypeObject.tp_new` function 954 … has returned an instance of the type. If the :c:member:`~PyTypeObject.tp_new` function returns an 956 …:c:member:`~PyTypeObject.tp_init` function is called; if :c:member:`~PyTypeObject.tp_new` returns … 960 :c:member:`~PyTypeObject.tp_new` was always called, if not *NULL*.) 984 allocate additional memory; that should be done by :c:member:`~PyTypeObject.tp_new`. 992 .. c:member:: newfunc PyTypeObject.tp_new 1002 PyObject *tp_new(PyTypeObject *subtype, PyObject *args, PyObject *kwds) 1006 type. Note that subtype doesn't have to equal the type whose :c:member:`~PyTypeObject.tp_new` 1010 The :c:member:`~PyTypeObject.tp_new` function should call ``subtype->tp_alloc(subtype, nitems)`` [all …]
|