/external/python/cpython3/Doc/extending/ |
D | newtypes_tutorial.rst | 97 .tp_new = PyType_GenericNew, 166 To enable object creation, we have to provide a :c:member:`~PyTypeObject.tp_new` 171 .tp_new = PyType_GenericNew, 279 ``NULL`` (which might happen here if ``tp_new`` failed midway). It then 293 strings, so we provide a ``tp_new`` implementation:: 316 and install it in the :c:member:`~PyTypeObject.tp_new` member:: 318 .tp_new = Custom_new, 320 The ``tp_new`` handler is responsible for creating (as opposed to initializing) 322 It is not required to define a ``tp_new`` member, and indeed many extension 324 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/Doc/includes/ |
D | custom.c | 16 .tp_new = PyType_GenericNew,
|
D | typestruct.h | 68 newfunc tp_new; member
|
D | custom2.c | 105 .tp_new = Custom_new,
|
D | custom3.c | 155 .tp_new = Custom_new,
|
D | custom4.c | 167 .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/cpython2/Modules/ |
D | xxmodule.c | 348 Null_Type.tp_new = PyType_GenericNew; in initxx()
|
/external/python/cpython3/Objects/ |
D | picklebufobject.c | 212 .tp_new = picklebuf_new,
|
D | typeobject.c | 167 CHECK(type->tp_new == NULL); in _PyType_CheckConsistency() 1115 if (type->tp_new == NULL) { in type_call() 1121 obj = type->tp_new(type, args, kwds); in type_call() 3258 if (winner->tp_new != type_new) { in type_new_get_bases() 3260 *type = winner->tp_new(winner, ctx->args, ctx->kwds); in type_new_get_bases() 4433 if (type->tp_new == object_new) { in object_init() 4447 if (type->tp_new != object_new) { in object_new() 5175 if (Py_TYPE(obj)->tp_new == NULL) { in reduce_newobj() 6280 if (type->tp_new == NULL in type_ready_set_new() 6288 if (type->tp_new != NULL) { in type_ready_set_new() [all …]
|
D | typeslots.inc | 66 {-1, offsetof(PyTypeObject, tp_new)},
|
/external/python/cpython3/Python/ |
D | context.c | 718 .tp_new = context_tp_new, 1068 .tp_new = contextvar_tp_new, 1209 .tp_new = token_tp_new,
|
/external/python/cpython3/Modules/ |
D | _testcapimodule.c | 1097 newfunc tp_new = PyType_GetSlot(&PyLong_Type, Py_tp_new); in test_get_statictype_slots() local 1098 if (PyLong_Type.tp_new != tp_new) { in test_get_statictype_slots() 1133 tp_new = PyType_GetSlot(&PyLong_Type, 0); in test_get_statictype_slots() 1134 if (tp_new != NULL) { in test_get_statictype_slots() 6171 .tp_new = PyType_GenericNew 6333 PyObject* op = PyList_Type.tp_new(type, args, kwds); in MyList_new() 6517 .tp_new = MethodDescriptor_new, 6557 .tp_new = MethodDescriptor2_new, 7034 .tp_new = PyType_GenericNew, 7056 .tp_new = PyType_GenericNew, [all …]
|
/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 | typeobj.rst | 126 …| :c:member:`~PyTypeObject.tp_new` | :c:type:`newfunc` | __new__ … 1208 :c:member:`~PyTypeObject.tp_new` to NULL and don't create the ``__new__`` 1216 :c:member:`~PyTypeObject.tp_new` is NULL. 1773 created normally by calling its type, after the type's :c:member:`~PyTypeObject.tp_new` function 1774 … has returned an instance of the type. If the :c:member:`~PyTypeObject.tp_new` function returns an 1776 …:c:member:`~PyTypeObject.tp_init` function is called; if :c:member:`~PyTypeObject.tp_new` returns … 1814 .. c:member:: newfunc PyTypeObject.tp_new 1820 PyObject *tp_new(PyTypeObject *subtype, PyObject *args, PyObject *kwds); 1824 type. Note that *subtype* doesn't have to equal the type whose :c:member:`~PyTypeObject.tp_new` 1828 The :c:member:`~PyTypeObject.tp_new` function should call ``subtype->tp_alloc(subtype, nitems)`` [all …]
|
/external/tensorflow/tensorflow/compiler/xla/python/ |
D | sharded_device_array.cc | 205 type->tp_new = sharded_device_array_tp_new; in RegisterTypes()
|
/external/python/cpython3/Include/cpython/ |
D | object.h | 258 newfunc tp_new; member
|
/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 …]
|