proj: Add optind to getopt
This commit is contained in:
@@ -344,6 +344,10 @@ class Parser:
|
||||
other_vals = ret[1].strip() if len(ret) > 1 else ''
|
||||
ret_value, _ = Parser.parse_arg(ret[0][7:])
|
||||
kwargs = {}
|
||||
if other_vals.startswith('optind '):
|
||||
ret = other_vals[7:].split(';', 1)
|
||||
kwargs['optind'] = int(ret[0].strip())
|
||||
other_vals = ret[1].strip() if len(ret) > 1 else ''
|
||||
if other_vals.startswith('errno '):
|
||||
ret = other_vals[6:].split(';', 1)
|
||||
kwargs['errno'] = ret[0].strip()
|
||||
@@ -404,7 +408,7 @@ class Parser:
|
||||
def before_getopt(self, argc: int, argv: PointerTo[list[PointerTo[bytes]]], optstring: PointerTo[bytes]) -> str:
|
||||
raise NotImplementedError()
|
||||
def after_getopt(self, argc: int, argv: PointerTo[list[PointerTo[bytes]]], optstring: PointerTo[bytes],
|
||||
ret_value: int) -> None:
|
||||
ret_value: int, optind: int = None) -> None:
|
||||
raise NotImplementedError()
|
||||
def before_exit(self, status: int) -> str:
|
||||
raise NotImplementedError()
|
||||
|
||||
Reference in New Issue
Block a user