| 109 | */ |
| 110 | |
| 111 | template<typename T> int CreateGlobalPointer(CSOUND *csound, const char *name, T *pointer) |
| 112 | { |
| 113 | T **pointer_to_pointer = 0; |
| 114 | int result = csound->CreateGlobalVariable(csound, name, sizeof(pointer_to_pointer)); |
| 115 | pointer_to_pointer = static_cast<T **>(csound->QueryGlobalVariable(csound, name)); |
| 116 | *pointer_to_pointer = pointer; |
| 117 | return result; |
| 118 | } |
| 119 | |
| 120 | /** |
| 121 | * Retrieve a pointer to a global heap-allocated object, e.g. one |
no outgoing calls
no test coverage detected