-------------------------- SvPyUtilGetFunctionName -------------------------- Get the function name used to display error messages for the Python API. Module functions are prefixed with ' _' so replaced the '_' with a '.' to make the name look at it would if referenced from Python.
| 126 | // with a '.' to make the name look at it would if referenced from Python. |
| 127 | // |
| 128 | std::string PyUtilGetFunctionName(const char* functionName) |
| 129 | { |
| 130 | std::string name(functionName); |
| 131 | std::size_t pos = name.find("_"); |
| 132 | if (pos == std::string::npos) { |
| 133 | return name; |
| 134 | } |
| 135 | return name.replace(pos, 1, "."); |
| 136 | } |
| 137 | |
| 138 | ////////////////////////////////////////////////////// |
| 139 | // U t i l i t y F u n c t i o n s // |
no test coverage detected