[Tarantool-patches] [PATCH msgpuck 2/2] Make MP_EXT mp_snprint() and mp_fprint() customizable

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Tue May 19 23:48:47 MSK 2020


Changed some comments:

====================
diff --git a/msgpuck.h b/msgpuck.h
index a92f177..16d72d5 100644
--- a/msgpuck.h
+++ b/msgpuck.h
@@ -983,6 +983,9 @@ mp_vformat(char *data, size_t data_size, const char *format, va_list args);
  * a standard JSON, printing a MessagePack buffer, having MP_EXT
  * in it, may lead to an invalid JSON.
  *
+ * However MP_EXT may be printed differently in case a proper
+ * virtual serializer was installed. \sa mp_fprint_ext_f.
+ *
  * \param file - pointer to file (or NULL for stdout)
  * \param data - pointer to buffer containing msgpack object
  * \retval >=0 - the number of bytes printed
@@ -1011,7 +1014,11 @@ extern mp_fprint_ext_f mp_fprint_ext;
 
 /**
  * \brief Default MP_EXT serializer into a file. Skips the object,
- * ignores all the other arguments, and writes 'undefined'.
+ * ignores all the other arguments, and writes
+ *
+ *     (extension: type <type>, len <len>)
+ *
+ * \sa mp_fprint().
  */
 int
 mp_fprint_ext_default(FILE *file, const char **data, int depth);
@@ -1056,7 +1063,10 @@ extern mp_snprint_ext_f mp_snprint_ext;
 /**
  * \brief Default MP_EXT serializer into a string. Skips the
  * object, ignores all the other arguments, and prints
- * 'undefined'.
+ *
+ *     (extension: type <type>, len <len>)
+ *
+ * \sa mp_snprint().
  */
 int
 mp_snprint_ext_default(char *buf, int size, const char **data, int depth);



More information about the Tarantool-patches mailing list