Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH v1 1/1] say: fix invalid arguments
@ 2018-07-18 14:26 Kirill Shcherbatov
  2018-07-19 11:33 ` [tarantool-patches] " Vladislav Shpilevoy
  2018-07-19 15:16 ` Kirill Yukhin
  0 siblings, 2 replies; 3+ messages in thread
From: Kirill Shcherbatov @ 2018-07-18 14:26 UTC (permalink / raw)
  To: tarantool-patches; +Cc: v.shpilevoy, Kirill Shcherbatov

_say function was called with invalid arguments.
Thank @sorc1 for patch.

Closes #3433.
---
Branch: http://github.com/tarantool/tarantool/tree/kshch/gh-3433-c-say-fix
Issue: https://github.com/tarantool/tarantool/issues/3433

 src/say.h | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/say.h b/src/say.h
index f324c27..708637c 100644
--- a/src/say.h
+++ b/src/say.h
@@ -261,26 +261,28 @@ CFORMAT(printf, 5, 0) extern sayfunc_t _say;
  * \param level (int) - log level (see enum \link say_level \endlink)
  * \param file (const char * ) - file name to print
  * \param line (int) - line number to print
+ * \param error (const char * ) - error description, may be NULL
  * \param format (const char * ) - printf()-like format string
  * \param ... - format arguments
  * \sa printf()
  * \sa enum say_level
  */
-#define say_file_line(level, file, line, format, ...) ({ \
+#define say_file_line(level, file, line, error, format, ...) ({ \
 	if (say_log_level_is_enabled(level)) \
-		_say(level, file, line, format, ##__VA_ARGS__); })
+		_say(level, file, line, error, format, ##__VA_ARGS__); })
 
 /**
  * Format and print a message to Tarantool log file.
  *
  * \param level (int) - log level (see enum \link say_level \endlink)
+ * \param error (const char * ) - error description, may be NULL
  * \param format (const char * ) - printf()-like format string
  * \param ... - format arguments
  * \sa printf()
  * \sa enum say_level
  */
-#define say(level, format, ...) ({ \
-	say_file_line(level, __FILE__, __LINE__, format, ##__VA_ARGS__); })
+#define say(level, error, format, ...) ({ \
+	say_file_line(level, __FILE__, __LINE__, error, format, ##__VA_ARGS__); })
 
 /**
  * Format and print a message to Tarantool log file.
-- 
2.7.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tarantool-patches] Re: [PATCH v1 1/1] say: fix invalid arguments
  2018-07-18 14:26 [tarantool-patches] [PATCH v1 1/1] say: fix invalid arguments Kirill Shcherbatov
@ 2018-07-19 11:33 ` Vladislav Shpilevoy
  2018-07-19 15:16 ` Kirill Yukhin
  1 sibling, 0 replies; 3+ messages in thread
From: Vladislav Shpilevoy @ 2018-07-19 11:33 UTC (permalink / raw)
  To: Kirill Shcherbatov, tarantool-patches

Thanks for the patch! LGTM.

On 18/07/2018 17:26, Kirill Shcherbatov wrote:
> _say function was called with invalid arguments.
> Thank @sorc1 for patch.
> 
> Closes #3433.
> ---
> Branch: http://github.com/tarantool/tarantool/tree/kshch/gh-3433-c-say-fix
> Issue: https://github.com/tarantool/tarantool/issues/3433
> 
>   src/say.h | 10 ++++++----
>   1 file changed, 6 insertions(+), 4 deletions(-)
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tarantool-patches] Re: [PATCH v1 1/1] say: fix invalid arguments
  2018-07-18 14:26 [tarantool-patches] [PATCH v1 1/1] say: fix invalid arguments Kirill Shcherbatov
  2018-07-19 11:33 ` [tarantool-patches] " Vladislav Shpilevoy
@ 2018-07-19 15:16 ` Kirill Yukhin
  1 sibling, 0 replies; 3+ messages in thread
From: Kirill Yukhin @ 2018-07-19 15:16 UTC (permalink / raw)
  To: tarantool-patches; +Cc: v.shpilevoy, Kirill Shcherbatov

Hello,
On 18 июл 17:26, Kirill Shcherbatov wrote:
> _say function was called with invalid arguments.
> Thank @sorc1 for patch.
> 
> Closes #3433.
> ---
> Branch: http://github.com/tarantool/tarantool/tree/kshch/gh-3433-c-say-fix
> Issue: https://github.com/tarantool/tarantool/issues/3433
I've checked the patch into 1.9 branch.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-19 15:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-18 14:26 [tarantool-patches] [PATCH v1 1/1] say: fix invalid arguments Kirill Shcherbatov
2018-07-19 11:33 ` [tarantool-patches] " Vladislav Shpilevoy
2018-07-19 15:16 ` Kirill Yukhin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox