Skip to content

Renaming LogCallback to avoid name conflicts #142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/drjit-core/jit.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,9 @@ extern JIT_EXPORT JIT_ENUM LogLevel jit_log_level_stderr();
* invoked with the contents of library log messages, whose severity matches or
* exceeds the specified \c level.
*/
typedef void (*LogCallback)(JIT_ENUM LogLevel, const char *);
typedef void (*JitLogCallback)(JIT_ENUM LogLevel, const char *);
extern JIT_EXPORT void jit_set_log_level_callback(JIT_ENUM LogLevel level,
LogCallback callback);
JitLogCallback callback);

/// Return the currently set minimum log level for output to a callback
extern JIT_EXPORT JIT_ENUM LogLevel jit_log_level_callback();
Expand Down
2 changes: 1 addition & 1 deletion src/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ LogLevel jit_log_level_stderr() {
return state.log_level_stderr;
}

void jit_set_log_level_callback(LogLevel level, LogCallback callback) {
void jit_set_log_level_callback(LogLevel level, JitLogCallback callback) {
lock_guard guard(state.lock);
state.log_level_callback = callback ? level : Disable;
state.log_callback = callback;
Expand Down
2 changes: 1 addition & 1 deletion src/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ struct State {
LogLevel log_level_callback = LogLevel::Disable;

/// Callback for log messages
LogCallback log_callback = nullptr;
JitLogCallback log_callback = nullptr;

/// Bit-mask of successfully initialized backends
uint32_t backends = 0;
Expand Down