-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Default initialize and destroy
NPyMechObj
.
When creating a `NPyMechObj` the Python C API will perform the equivalent of a `malloc(sizeof(NPyMechObj))`. This will return an invalid object, that must be fixed using placement new. Details: * `PyObject_New(NPyMechObj, pmech_generic_type)` does not call `tp_new`. * `tp_free` is the mental equivalent of `free`. * Creating a valid NPyMechObj object should be done via `new_mechobj()`.
- Loading branch information
Showing
1 changed file
with
16 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters