* linear search pointer in table * number of pointers is usually quite small but if a performance impact can be * measured this could be converted to a binary search */
| 98 | * measured this could be converted to a binary search |
| 99 | */ |
| 100 | static int |
| 101 | find_addr(void * addresses[], npy_intp naddr, void * addr) |
| 102 | { |
| 103 | npy_intp j; |
| 104 | for (j = 0; j < naddr; j++) { |
| 105 | if (addr == addresses[j]) { |
| 106 | return 1; |
| 107 | } |
| 108 | } |
| 109 | return 0; |
| 110 | } |
| 111 | |
| 112 | static int |
| 113 | check_callers(int * cannot) |