Copilot commented on code in PR #13613:
URL: https://github.com/apache/trafficserver/pull/13613#discussion_r3907939969


##########
include/iocore/net/SessionSharingAPIEnums.h:
##########
@@ -39,21 +39,21 @@ typedef enum {
   TS_SERVER_SESSION_SHARING_MATCH_NONE,
   TS_SERVER_SESSION_SHARING_MATCH_BOTH,
   TS_SERVER_SESSION_SHARING_MATCH_HOST,
-} TSServerSessionSharingMatchType;
+};

Review Comment:
   These enums are in an SDK header (see the plugin binary compatibility note) 
and changing from `typedef enum { ... } Name;` to `enum Name { ... };` makes 
the type name unusable from C without the `enum` keyword. To preserve C plugin 
source compatibility while keeping C++ modernized, add a C-only typedef after 
the enum.
   
   This issue also appears in the following locations of the same file:
   - line 51
   - line 59



##########
plugins/lua/ts_lua_stat.cc:
##########
@@ -18,22 +18,19 @@
 
 #include "ts_lua_util.h"
 
-typedef enum {
-  TS_LUA_STAT_PERSISTENT     = TS_STAT_PERSISTENT,
-  TS_LUA_STAT_NON_PERSISTENT = TS_STAT_NON_PERSISTENT
-} TSLuaStatPersistentType;
+enum TSLuaStatPersistentType { TS_LUA_STAT_PERSISTENT = TS_STAT_PERSISTENT, 
TS_LUA_STAT_NON_PERSISTENT = TS_STAT_NON_PERSISTENT };

Review Comment:
   This enum was reformatted into a single long line, which is inconsistent 
with the surrounding enums in this file and risks exceeding the project's 
132-char line limit. Please keep it multi-line like the others for readability 
and consistent formatting.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to