@@ -376,7 +376,7 @@ automatically generated class:
376376 <td>Uses variable-length encoding. Inefficient for encoding negative
377377 numbers – if your field is likely to have negative values, use sint32
378378 instead.</td>
379- <td>int32 </td>
379+ <td>int32_t </td>
380380 <td>int</td>
381381 <td>int</td>
382382 <td>int32</td>
@@ -391,7 +391,7 @@ automatically generated class:
391391 <td>Uses variable-length encoding. Inefficient for encoding negative
392392 numbers – if your field is likely to have negative values, use sint64
393393 instead.</td>
394- <td>int64 </td>
394+ <td>int64_t </td>
395395 <td>long</td>
396396 <td>int/long<sup>[4]</sup></td>
397397 <td>int64</td>
@@ -404,7 +404,7 @@ automatically generated class:
404404 <tr>
405405 <td>uint32</td>
406406 <td>Uses variable-length encoding.</td>
407- <td>uint32 </td>
407+ <td>uint32_t </td>
408408 <td>int<sup>[2]</sup></td>
409409 <td>int/long<sup>[4]</sup></td>
410410 <td>uint32</td>
@@ -417,7 +417,7 @@ automatically generated class:
417417 <tr>
418418 <td>uint64</td>
419419 <td>Uses variable-length encoding.</td>
420- <td>uint64 </td>
420+ <td>uint64_t </td>
421421 <td>long<sup>[2]</sup></td>
422422 <td>int/long<sup>[4]</sup></td>
423423 <td>uint64</td>
@@ -431,7 +431,7 @@ automatically generated class:
431431 <td>sint32</td>
432432 <td>Uses variable-length encoding. Signed int value. These more
433433 efficiently encode negative numbers than regular int32s.</td>
434- <td>int32 </td>
434+ <td>int32_t </td>
435435 <td>int</td>
436436 <td>int</td>
437437 <td>int32</td>
@@ -445,7 +445,7 @@ automatically generated class:
445445 <td>sint64</td>
446446 <td>Uses variable-length encoding. Signed int value. These more
447447 efficiently encode negative numbers than regular int64s.</td>
448- <td>int64 </td>
448+ <td>int64_t </td>
449449 <td>long</td>
450450 <td>int/long<sup>[4]</sup></td>
451451 <td>int64</td>
@@ -459,7 +459,7 @@ automatically generated class:
459459 <td>fixed32</td>
460460 <td>Always four bytes. More efficient than uint32 if values are often
461461 greater than 2<sup>28</sup>.</td>
462- <td>uint32 </td>
462+ <td>uint32_t </td>
463463 <td>int<sup>[2]</sup></td>
464464 <td>int/long<sup>[4]</sup></td>
465465 <td>uint32</td>
@@ -473,7 +473,7 @@ automatically generated class:
473473 <td>fixed64</td>
474474 <td>Always eight bytes. More efficient than uint64 if values are often
475475 greater than 2<sup>56</sup>.</td>
476- <td>uint64 </td>
476+ <td>uint64_t </td>
477477 <td>long<sup>[2]</sup></td>
478478 <td>int/long<sup>[4]</sup></td>
479479 <td>uint64</td>
@@ -486,7 +486,7 @@ automatically generated class:
486486 <tr>
487487 <td>sfixed32</td>
488488 <td>Always four bytes.</td>
489- <td>int32 </td>
489+ <td>int32_t </td>
490490 <td>int</td>
491491 <td>int</td>
492492 <td>int32</td>
@@ -499,7 +499,7 @@ automatically generated class:
499499 <tr>
500500 <td>sfixed64</td>
501501 <td>Always eight bytes.</td>
502- <td>int64 </td>
502+ <td>int64_t </td>
503503 <td>long</td>
504504 <td>int/long<sup>[4]</sup></td>
505505 <td>int64</td>
@@ -696,8 +696,8 @@ field default.
696696You can define aliases by assigning the same value to different enum constants.
697697To do this you need to set the ` allow_alias ` option to ` true ` . Otherwise, the
698698protocol buffer compiler generates a warning message when aliases are
699- found. Though all alias values are valid during deserialization, the first value
700- is always used when serializing .
699+ found. Though all alias values are valid for serialization, only the first value
700+ is used when deserializing .
701701
702702``` proto
703703enum EnumAllowingAlias {
@@ -716,6 +716,8 @@ enum EnumNotAllowingAlias {
716716}
717717```
718718
719+ ### Enum Constants {#enum-constants}
720+
719721Enumerator constants must be in the range of a 32-bit integer. Since ` enum `
720722values use
721723[ varint encoding] ( /programming-guides/encoding ) on the
@@ -725,6 +727,8 @@ these `enum`s can be reused in any message definition in your `.proto` file. You
725727can also use an ` enum ` type declared in one message as the type of a field in a
726728different message, using the syntax ` _MessageType_._EnumType_ ` .
727729
730+ ### Language-specific Enum Implementations {#enum-language}
731+
728732When you run the protocol buffer compiler on a ` .proto ` that uses an ` enum ` , the
729733generated code will have a corresponding ` enum ` for Java, Kotlin, or C++, or a
730734special ` EnumDescriptor ` class for Python that's used to create a set of
0 commit comments