Commit 40a08c7e authored by Reimar Döffinger's avatar Reimar Döffinger

Correct GET/PUT_UTF8 comment: the get/put functions might be called up

to 7 times, though only up to 4 times for valid utf-8 values.

Originally committed as revision 7124 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent a99cfb0d
...@@ -308,7 +308,8 @@ static inline int ff_get_fourcc(const char *s){ ...@@ -308,7 +308,8 @@ static inline int ff_get_fourcc(const char *s){
* ucs-4 character and should be a left value. * ucs-4 character and should be a left value.
* \param GET_BYTE gets utf-8 encoded bytes from any proper source. It can be * \param GET_BYTE gets utf-8 encoded bytes from any proper source. It can be
* a function or a statement whose return value or evaluated value is of type * a function or a statement whose return value or evaluated value is of type
* uint8_t. It will be executed up to 4 times. * uint8_t. It will be executed up to 4 times for values in the valid utf-8 range,
* and up to 7 times in the general case.
* \param ERROR action that should be taken when an invalid utf-8 byte is returned * \param ERROR action that should be taken when an invalid utf-8 byte is returned
* from GET_BYTE. It should be a statement that jumps out of the macro, * from GET_BYTE. It should be a statement that jumps out of the macro,
* like exit(), goto, return, break, or continue. * like exit(), goto, return, break, or continue.
...@@ -340,7 +341,8 @@ static inline int ff_get_fourcc(const char *s){ ...@@ -340,7 +341,8 @@ static inline int ff_get_fourcc(const char *s){
* \param PUT_BYTE writes the converted utf-8 bytes to any proper destination. * \param PUT_BYTE writes the converted utf-8 bytes to any proper destination.
* It could be a function or a statement, and uses tmp as the input byte. * It could be a function or a statement, and uses tmp as the input byte.
* For example, PUT_BYTE could be "*output++ = tmp;" PUT_BYTE will be * For example, PUT_BYTE could be "*output++ = tmp;" PUT_BYTE will be
* executed up to 4 times, depending on the length of the converted * executed up to 4 times for values in the valid utf-8 range and up to
* 7 times in the general case, depending on the length of the converted
* unicode character. * unicode character.
*/ */
#define PUT_UTF8(val, tmp, PUT_BYTE)\ #define PUT_UTF8(val, tmp, PUT_BYTE)\
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment