summaryrefslogtreecommitdiff
path: root/numpy/oldnumeric/misc.py
diff options
context:
space:
mode:
authorThouis (Ray) Jones <thouis@gmail.com>2012-05-25 09:59:43 +0200
committerThouis (Ray) Jones <thouis@gmail.com>2012-06-15 13:55:40 +0200
commitbe294ab42bc51c7588e9ed50982046c03f00f618 (patch)
treecd60703c39ce6389acc6e80789ca8c6c8a1e0651 /numpy/oldnumeric/misc.py
parent6fe584f1d2775d96fa68ccb4707ba0f658e85376 (diff)
downloadnumpy-be294ab42bc51c7588e9ed50982046c03f00f618.tar.gz
ENH: expose PyDataMem_NEW/FREE/RENEW as numpy API functions with an event hook.
Moves PyDataMem_NEW/FREE/RENEW to the external API. Fixes PyDataMem_NEW/RENEW to return void* instead of char*. Replaces PyDataMem_NEW/FREE with NpySortArray_malloc/free in sort.c.src (should be reverted if npysort is moved to be part of multiarraymodule). Adds PyDataMem_SetEventHook which takes a (PyDataMem_EventHookFunc *) as an argument, with signature: void hook(void *old, void *new, size_t size). When not NULL, hook will be called at the end of each PyDataMem_NEW/FREE/RENEW: result = PyDataMem_NEW(size) -> (*hook(NULL, result, size) PyDataMem_FREE(ptr) -> (*hook(ptr, NULL, 0) result = PyDataMem_RENEW(ptr, size) -> (*hook)(ptr, result, size) Adds tests in multiarray_tests.c.src, driven by tests/test_multiarray.py.
Diffstat (limited to 'numpy/oldnumeric/misc.py')
0 files changed, 0 insertions, 0 deletions