Skip to content

Commit

Permalink
Rename bind -> str
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 committed Apr 21, 2024
1 parent f4c5b5f commit 9e6a430
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions librz/core/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ RZ_API void rz_core_notify_error(RZ_NONNULL RzCore *core, RZ_NONNULL const char
va_end(args);
}

RZ_API void rz_core_notify_begin_bind(RZ_NONNULL RzCore *core, RZ_NONNULL const char *text) {
RZ_API void rz_core_notify_begin_str(RZ_NONNULL RzCore *core, RZ_NONNULL const char *text) {
rz_core_notify_begin(core, "%s", text);
}

RZ_API void rz_core_notify_done_bind(RZ_NONNULL RzCore *core, RZ_NONNULL const char *text) {
RZ_API void rz_core_notify_done_str(RZ_NONNULL RzCore *core, RZ_NONNULL const char *text) {
rz_core_notify_done(core, "%s", text);
}

RZ_API void rz_core_notify_error_bind(RZ_NONNULL RzCore *core, RZ_NONNULL const char *text) {
RZ_API void rz_core_notify_error_str(RZ_NONNULL RzCore *core, RZ_NONNULL const char *text) {
rz_core_notify_error(core, "%s", text);
}

Expand Down
6 changes: 3 additions & 3 deletions librz/include/rz_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,9 @@ RZ_API void rz_core_notify_begin(RZ_NONNULL RzCore *core, RZ_NONNULL const char
RZ_API void rz_core_notify_done(RZ_NONNULL RzCore *core, RZ_NONNULL const char *format, ...) RZ_PRINTF_CHECK(2, 3);
RZ_API void rz_core_notify_error(RZ_NONNULL RzCore *core, RZ_NONNULL const char *format, ...) RZ_PRINTF_CHECK(2, 3);

RZ_API void rz_core_notify_begin_bind(RZ_NONNULL RzCore *core, RZ_NONNULL const char *text);
RZ_API void rz_core_notify_done_bind(RZ_NONNULL RzCore *core, RZ_NONNULL const char *text);
RZ_API void rz_core_notify_error_bind(RZ_NONNULL RzCore *core, RZ_NONNULL const char *text);
RZ_API void rz_core_notify_begin_str(RZ_NONNULL RzCore *core, RZ_NONNULL const char *text);
RZ_API void rz_core_notify_done_str(RZ_NONNULL RzCore *core, RZ_NONNULL const char *text);
RZ_API void rz_core_notify_error_str(RZ_NONNULL RzCore *core, RZ_NONNULL const char *text);

/**
* \brief APIs to handle Visual Gadgets
Expand Down
2 changes: 1 addition & 1 deletion librz/include/rz_util/rz_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ RZ_API void rz_log(const char *funcname, const char *filename,
RZ_API void rz_vlog(const char *funcname, const char *filename,
ut32 lineno, RzLogLevel level, const char *tag, const char *fmtstr, va_list args);

RZ_API void rz_log_bind(const char *funcname, const char *filename,
RZ_API void rz_log_str(const char *funcname, const char *filename,
ut32 lineno, RzLogLevel level, const char *tag, const char *msg);

#ifdef __cplusplus
Expand Down
2 changes: 1 addition & 1 deletion librz/util/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ RZ_API void rz_log(const char *funcname, const char *filename,
* \param tag A string placed at the beginning of the log message. If NULL, the log level is used.
* \param msg The log message.
*/
RZ_API void rz_log_bind(const char *funcname, const char *filename,
RZ_API void rz_log_str(const char *funcname, const char *filename,
ut32 lineno, RzLogLevel level, const char *tag, const char *msg) {
rz_log(funcname, filename, lineno, level, tag, "%s", msg);
}
2 changes: 1 addition & 1 deletion test/unit/test_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ bool test_log_binding(void) {
rz_log_del_callback((RzLogCallback)large_check);
rz_log_del_callback((RzLogCallback)small_check);
rz_log_add_callback((RzLogCallback)bind_check);
rz_log_bind("func", "file", 1, RZ_LOGLVL_ERROR, NULL, "3");
rz_log_str("func", "file", 1, RZ_LOGLVL_ERROR, NULL, "3");
mu_end;
}

Expand Down

0 comments on commit 9e6a430

Please sign in to comment.