[issue42292] C API: Allocating Objects on the Heap. Misleading documentation.

2020-11-11 Thread igo95862
igo95862 added the comment: I found out that you can call the type as an object in order to create new object. Example: SdBusMessageObject *new_message_object = (SdBusMessageObject *)PyObject_Call((PyObject *)&SdBusMessageType, dummy_tuple, dummy_dict); This is somewhat not documented.

[issue42292] C API: Allocating Objects on the Heap. Misleading documentation.

2020-11-08 Thread igo95862
Change by igo95862 : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue42292] C API: Allocating Objects on the Heap. Misleading documentation.

2020-11-08 Thread igo95862
New submission from igo95862 : The issue is that the function names are too similar to other function that do completely different things. `PyObject_Init` this function does not use `__init__` at all. What it does is sets the already allocated object pointer to the specific type and incremen