diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-04-01 12:46:10 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-04-01 12:46:10 +0200 |
| commit | 162bd26be4e47d89f305435f7a1917b023138ed6 (patch) | |
| tree | b77571bea2cbc1baf320deae9895e1a185670a4b /docs/syscall_descriptions_syntax.md | |
| parent | 3e1cf9ad8a569844caebca4ce63759f15324c422 (diff) | |
pkg/compiler: make buffer alias to ptr[array[int8]]
Ptr type has special handling of direction (pointers are always input).
But buffer type missed this special case all the time.
Make buffer less special by aliasing to the ptr[array[int8]] type.
As the result buffer type can't have optional trailing "opt" attribute
because we don't have such support for templates yet.
Change such cases to use ptr type directly.
Fixes #1097
Diffstat (limited to 'docs/syscall_descriptions_syntax.md')
| -rw-r--r-- | docs/syscall_descriptions_syntax.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/syscall_descriptions_syntax.md b/docs/syscall_descriptions_syntax.md index fa2e3985d..9578656d7 100644 --- a/docs/syscall_descriptions_syntax.md +++ b/docs/syscall_descriptions_syntax.md @@ -8,7 +8,7 @@ arg = argname type argname = identifier type = typename [ "[" type-options "]" ] typename = "const" | "intN" | "intptr" | "flags" | "array" | "ptr" | - "buffer" | "string" | "strconst" | "filename" | "len" | + "string" | "strconst" | "filename" | "len" | "bytesize" | "bytesizeN" | "bitsize" | "vma" | "proc" type-options = [type-opt ["," type-opt]] ``` @@ -33,8 +33,6 @@ rest of the type-options are type-specific: "ptr"/"ptr64": a pointer to an object, type-options: type of the object; direction (in/out/inout) ptr64 has size of 8 bytes regardless of target pointer size -"buffer": a pointer to a memory buffer (like read/write buffer argument), type-options: - direction (in/out/inout) "string": a zero-terminated memory buffer (no pointer indirection implied), type-options: either a string value in quotes for constant strings (e.g. "foo"), or a reference to string flags (special value `filename` produces file names), @@ -187,6 +185,8 @@ type bool64 int64[0:1] type boolptr intptr[0:1] type filename string[filename] + +type buffer[DIR] ptr[DIR, array[int8]] ``` ## Type Templates |
