SolidWallOfCode commented on a change in pull request #8052:
URL: https://github.com/apache/trafficserver/pull/8052#discussion_r676779830



##########
File path: include/ts/ts.h
##########
@@ -962,6 +967,7 @@ tsapi TSMLoc TSMimeHdrFieldGet(TSMBuffer bufp, TSMLoc hdr, 
int idx);
 
  */
 tsapi TSMLoc TSMimeHdrFieldFind(TSMBuffer bufp, TSMLoc hdr, const char *name, 
int length);
+tsapi TSReturnCode TSMimeHdrFieldFastFind(TSMBuffer bufp, TSMLoc hdr, const 
char *name, int length, TSMLoc *locp);

Review comment:
       Seems reasonable, although it should be `TSFieldHandle` to match the 
function name. A few points
   1. Is `void *` the best choice? Why not `unsigned char` to indicate a raw 
buffer? Is this to help with alignment?
   2. I think even in C one can return a struct by value. That might be a 
better choice than passing a pointer. The caller would then check the return 
value for validity rather than an explicit error code.




-- 
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