Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153708526
D56407.id175567.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D56407.id175567.diff
View Options
diff --git a/sys/tools/syscalls/core/scarg.lua b/sys/tools/syscalls/core/scarg.lua
--- a/sys/tools/syscalls/core/scarg.lua
+++ b/sys/tools/syscalls/core/scarg.lua
@@ -29,6 +29,21 @@
return false
end
+-- Extracts the Microsoft(R) SAL annotations from this argument.
+local function extractArgAnnotations(arg)
+ local annotations = {}
+ for ann in arg:gmatch("_Contains_[^ ]*[_)]") do
+ table.insert(annotations, ann)
+ end
+ for ann in arg:gmatch("_In[^ ]*[_)]") do
+ table.insert(annotations, ann)
+ end
+ for ann in arg:gmatch("_Out[^ ]*[_)]") do
+ table.insert(annotations, ann)
+ end
+ return table.concat(annotations, " ")
+end
+
-- Strips the Microsoft(R) SAL annotations from this argument.
local function stripArgAnnotations(arg)
arg = arg:gsub("_Contains_[^ ]*[_)] ?", "")
@@ -46,6 +61,7 @@
self.arg_abi_change = checkAbiChanges(self.scarg)
self.changes_abi = self.arg_abi_change
+ self.annotation = extractArgAnnotations(self.scarg)
self.scarg = stripArgAnnotations(self.scarg)
self.name = self.scarg:match("([^* ]+)$")
@@ -126,15 +142,18 @@
table.insert(tbl, {
type = "uint32_t",
name = self.name .. "1",
+ annotation = self.annotation or "",
})
table.insert(tbl, {
type = "uint32_t",
name = self.name .. "2",
+ annotation = "",
})
else
table.insert(tbl, {
type = self.type,
name = self.name,
+ annotation = self.annotation or "",
})
end
end
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 24, 2:45 AM (16 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31609101
Default Alt Text
D56407.id175567.diff (1 KB)
Attached To
Mode
D56407: syscalls: Preserve the attributes of the args
Attached
Detach File
Event Timeline
Log In to Comment