mirror of
https://github.com/justinian/jsix.git
synced 2025-12-09 16:04:32 -08:00
[kernel] Add new zero_ok flag to syscall params
The new zero_ok flag is similar to optional for reference parameters, but only in cases where there is a length parameter. If that parameter is a reference parameter itself and is null, or it is non-null and contains a non-zero length, or there is no length parameter, then the main parameter may not be null.
This commit is contained in:
@@ -62,5 +62,7 @@ class Param:
|
||||
|
||||
@property
|
||||
def optional(self):
|
||||
return "optional" in self.options
|
||||
if "zero_ok" in self.options: return "zero_ok"
|
||||
elif "optional" in self.options: return "optional"
|
||||
else: return "required"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user