RFR v5 - 8027634: Support @argfiles for java command-line tool
henry.jen at oracle.com
Mon Aug 17 14:10:48 UTC 2015
> On Aug 16, 2015, at 4:51 PM, Henry Jen <henry.jen at oracle.com> wrote:
> Thanks for reviewing, comment inline below,
>> On Aug 14, 2015, at 4:07 PM, Mandy Chung <mandy.chung at oracle.com> wrote:
>>> On Aug 14, 2015, at 1:10 PM, Henry Jen <henry.jen at oracle.com> wrote:
>>> Another minor revision address comments, no real behavior changes except use JLI_StrCmp instead of JLI_StrCCmp in checkArg().
>> JLI_PreprocessingArg returns NULL if not @argfile
>> Would it be better to return JLI_List containing one element as argv[i]? We want to avoid new/free JLI_List for every argument and maybe a preallocated reusable copy for single element list to use (non-growable)?
> Only argument with @prefix will be expanded, for any other cases, the function return NULL. This avoid any copy when not necessary. Regular argument is left alone, so that caller will just use the original value.
I think I may be talking at a different thing, guess you meant the make JLI_List JLI_PreprocessArg(const char*) to void JLI_PreprocessArg(JLI_List, const char*) and pass in a list to hold all the arguments.
That is reasonable. Considered that but didn’t do it eventually because not much benefits and hide the “expansion” fact. Since now you mentioned this, it probably worth to do it that way.
More information about the core-libs-dev