3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-28 03:15:50 +00:00

change verific log callback api

This commit is contained in:
Miodrag Milanovic 2023-11-01 08:13:27 +01:00
parent 672375ed02
commit 4eb18e1f07
3 changed files with 5 additions and 5 deletions

View file

@ -115,7 +115,7 @@ void msg_func(msg_type_t msg_type, const char *message_id, linefile_type linefil
if (log_verific_callback) {
string full_message = stringf("%s%s\n", message_prefix.c_str(), message.c_str());
log_verific_callback(int(msg_type), message_id, LineFile::GetFileName(linefile), LineFile::GetLineNo(linefile), full_message.c_str());
log_verific_callback(int(msg_type), message_id, LineFile::GetFileName(linefile), linefile->GetLeftLine(), linefile->GetLeftCol(), linefile->GetRightLine(), linefile->GetRightCol(), full_message.c_str());
} else {
if (msg_type == VERIFIC_ERROR || msg_type == VERIFIC_WARNING || msg_type == VERIFIC_PROGRAM_ERROR)
log_warning_noprefix("%s%s\n", message_prefix.c_str(), message.c_str());
@ -126,7 +126,7 @@ void msg_func(msg_type_t msg_type, const char *message_id, linefile_type linefil
verific_error_msg = message;
}
void set_verific_logging(void (*cb)(int msg_type, const char *message_id, const char* file_path, unsigned int line_no, const char *msg))
void set_verific_logging(void (*cb)(int msg_type, const char *message_id, const char* file_path, unsigned int left_line, unsigned int left_col, unsigned int right_line, unsigned int right_col, const char *msg))
{
Message::SetConsoleOutput(0);
Message::RegisterCallBackMsg(msg_func);