RFC: Alternative for exemaker
Andrei Polushin
polushin at gmail.com
Sat Jun 23 12:31:22 CDT 2012
23.06.2012 18:59, Adrian Buehlmann wrote:
> + /*
> + Add the scriptname, if it's not already there. It may already be
> + there, if mercurial spawned a child process of itself, in the same way
> + as it got called, that is, with the scriptname already in place. So
> + we optionally accept the scriptname as the first argument, letting
> + our exe taking the role of the python interpreter.
> + */
> + if (argc > 0 && strcmp(argv[1], scriptname) != 0) {
> + pyargv[n++] = scriptname;
> + }
> +
> + /* copy remaining args from the command line */
It looks like there no need to copy argv in case when argv[1] is the same
string as the scriptname, you may just return Py_Main(argc, argv).
--
Andrei Polushin
More information about the Mercurial-devel
mailing list