Change to "contextless" from "c"`

This commit is contained in:
gingerBill
2023-05-29 23:30:48 +01:00
parent b848ae7abb
commit c1eb536726
+22 -22
View File
@@ -968,7 +968,7 @@ prestat_t :: struct {
}, },
} }
@(default_calling_convention="c") @(default_calling_convention="contextless")
foreign wasi { foreign wasi {
/** /**
* Read command-line argument data. * Read command-line argument data.
@@ -1306,7 +1306,7 @@ foreign wasi {
* Returns the number of arguments and the size of the argument string * Returns the number of arguments and the size of the argument string
* data, or an error. * data, or an error.
*/ */
args_sizes_get :: proc "c" () -> (num_args, size_of_args: size_t, err: errno_t) { args_sizes_get :: proc "contextless" () -> (num_args, size_of_args: size_t, err: errno_t) {
err = wasi_args_sizes_get(&num_args, &size_of_args) err = wasi_args_sizes_get(&num_args, &size_of_args)
return return
} }
@@ -1316,7 +1316,7 @@ args_sizes_get :: proc "c" () -> (num_args, size_of_args: size_t, err: errno_t)
* Returns the number of environment variable arguments and the size of the * Returns the number of environment variable arguments and the size of the
* environment variable data. * environment variable data.
*/ */
environ_sizes_get :: proc "c" () -> (num_envs, size_of_envs: size_t, err: errno_t) { environ_sizes_get :: proc "contextless" () -> (num_envs, size_of_envs: size_t, err: errno_t) {
err = wasi_environ_sizes_get(&num_envs, &size_of_envs) err = wasi_environ_sizes_get(&num_envs, &size_of_envs)
return return
} }
@@ -1328,7 +1328,7 @@ environ_sizes_get :: proc "c" () -> (num_envs, size_of_envs: size_t, err: errno_
* @return * @return
* The resolution of the clock, or an error if one happened. * The resolution of the clock, or an error if one happened.
*/ */
clock_res_get :: proc "c" ( clock_res_get :: proc "contextless" (
/** /**
* The clock for which to return the resolution. * The clock for which to return the resolution.
*/ */
@@ -1343,7 +1343,7 @@ clock_res_get :: proc "c" (
* @return * @return
* The time value of the clock. * The time value of the clock.
*/ */
clock_time_get :: proc "c" ( clock_time_get :: proc "contextless" (
/** /**
* The clock for which to return the time. * The clock for which to return the time.
*/ */
@@ -1362,7 +1362,7 @@ clock_time_get :: proc "c" (
* @return * @return
* The buffer where the file descriptor's attributes are stored. * The buffer where the file descriptor's attributes are stored.
*/ */
fd_fdstat_get :: proc "c" ( fd_fdstat_get :: proc "contextless" (
fd: fd_t, fd: fd_t,
) -> (stat: fdstat_t, err: errno_t) { ) -> (stat: fdstat_t, err: errno_t) {
err = wasi_fd_fdstat_get(fd, &stat) err = wasi_fd_fdstat_get(fd, &stat)
@@ -1373,7 +1373,7 @@ fd_fdstat_get :: proc "c" (
* @return * @return
* The buffer where the file's attributes are stored. * The buffer where the file's attributes are stored.
*/ */
fd_filestat_get :: proc "c" ( fd_filestat_get :: proc "contextless" (
fd: fd_t, fd: fd_t,
) -> (stat: filestat_t, err: errno_t) { ) -> (stat: filestat_t, err: errno_t) {
err = wasi_fd_filestat_get(fd, &stat) err = wasi_fd_filestat_get(fd, &stat)
@@ -1389,7 +1389,7 @@ fd_filestat_get :: proc "c" (
* @return * @return
* The number of bytes read. * The number of bytes read.
*/ */
fd_pread :: proc "c" ( fd_pread :: proc "contextless" (
fd: fd_t, fd: fd_t,
/** /**
* List of scatter/gather vectors in which to store data. * List of scatter/gather vectors in which to store data.
@@ -1408,7 +1408,7 @@ fd_pread :: proc "c" (
* @return * @return
* The buffer where the description is stored. * The buffer where the description is stored.
*/ */
fd_prestat_get :: proc "c" ( fd_prestat_get :: proc "contextless" (
fd: fd_t, fd: fd_t,
) -> (desc: prestat_t, err: errno_t) { ) -> (desc: prestat_t, err: errno_t) {
err = wasi_fd_prestat_get(fd, &desc) err = wasi_fd_prestat_get(fd, &desc)
@@ -1420,7 +1420,7 @@ fd_prestat_get :: proc "c" (
* @return * @return
* The number of bytes written. * The number of bytes written.
*/ */
fd_pwrite :: proc "c" ( fd_pwrite :: proc "contextless" (
fd: fd_t, fd: fd_t,
/** /**
* List of scatter/gather vectors from which to retrieve data. * List of scatter/gather vectors from which to retrieve data.
@@ -1440,7 +1440,7 @@ fd_pwrite :: proc "c" (
* @return * @return
* The number of bytes read. * The number of bytes read.
*/ */
fd_read :: proc "c" ( fd_read :: proc "contextless" (
fd: fd_t, fd: fd_t,
/** /**
* List of scatter/gather vectors to which to store data. * List of scatter/gather vectors to which to store data.
@@ -1463,7 +1463,7 @@ fd_read :: proc "c" (
* @return * @return
* The number of bytes stored in the read buffer. If less than the size of the read buffer, the end of the directory has been reached. * The number of bytes stored in the read buffer. If less than the size of the read buffer, the end of the directory has been reached.
*/ */
fd_readdir :: proc "c" ( fd_readdir :: proc "contextless" (
fd: fd_t, fd: fd_t,
/** /**
* The buffer where directory entries are stored * The buffer where directory entries are stored
@@ -1483,7 +1483,7 @@ fd_readdir :: proc "c" (
* @return * @return
* The new offset of the file descriptor, relative to the start of the file. * The new offset of the file descriptor, relative to the start of the file.
*/ */
fd_seek :: proc "c" ( fd_seek :: proc "contextless" (
fd: fd_t, fd: fd_t,
/** /**
* The number of bytes to move. * The number of bytes to move.
@@ -1503,7 +1503,7 @@ fd_seek :: proc "c" (
* @return * @return
* The current offset of the file descriptor, relative to the start of the file. * The current offset of the file descriptor, relative to the start of the file.
*/ */
fd_tell :: proc "c" ( fd_tell :: proc "contextless" (
fd: fd_t, fd: fd_t,
) -> (offset: filesize_t, err: errno_t) { ) -> (offset: filesize_t, err: errno_t) {
err = wasi_fd_tell(fd, &offset) err = wasi_fd_tell(fd, &offset)
@@ -1513,7 +1513,7 @@ fd_tell :: proc "c" (
* Write to a file descriptor. * Write to a file descriptor.
* Note: This is similar to `writev` in POSIX. * Note: This is similar to `writev` in POSIX.
*/ */
fd_write :: proc "c" ( fd_write :: proc "contextless" (
fd: fd_t, fd: fd_t,
/** /**
* List of scatter/gather vectors from which to retrieve data. * List of scatter/gather vectors from which to retrieve data.
@@ -1529,7 +1529,7 @@ fd_write :: proc "c" (
* @return * @return
* The buffer where the file's attributes are stored. * The buffer where the file's attributes are stored.
*/ */
path_filestat_get :: proc "c" ( path_filestat_get :: proc "contextless" (
fd: fd_t, fd: fd_t,
/** /**
* Flags determining the method of how the path is resolved. * Flags determining the method of how the path is resolved.
@@ -1554,7 +1554,7 @@ path_filestat_get :: proc "c" (
* @return * @return
* The file descriptor of the file that has been opened. * The file descriptor of the file that has been opened.
*/ */
path_open :: proc "c" ( path_open :: proc "contextless" (
fd: fd_t, fd: fd_t,
/** /**
* Flags determining the method of how the path is resolved. * Flags determining the method of how the path is resolved.
@@ -1591,7 +1591,7 @@ path_open :: proc "c" (
* @return * @return
* The number of bytes placed in the buffer. * The number of bytes placed in the buffer.
*/ */
path_readlink :: proc "c" ( path_readlink :: proc "contextless" (
fd: fd_t, fd: fd_t,
/** /**
* The path of the symbolic link from which to read. * The path of the symbolic link from which to read.
@@ -1610,7 +1610,7 @@ path_readlink :: proc "c" (
* @return * @return
* The number of events stored. * The number of events stored.
*/ */
poll_oneoff :: proc "c" ( poll_oneoff :: proc "contextless" (
/** /**
* The events to which to subscribe. * The events to which to subscribe.
*/ */
@@ -1634,7 +1634,7 @@ poll_oneoff :: proc "c" (
* @return * @return
* Number of bytes stored in ri_data and message flags. * Number of bytes stored in ri_data and message flags.
*/ */
sock_recv :: proc "c" ( sock_recv :: proc "contextless" (
fd: fd_t, fd: fd_t,
/** /**
* List of scatter/gather vectors to which to store data. * List of scatter/gather vectors to which to store data.
@@ -1655,7 +1655,7 @@ sock_recv :: proc "c" (
* @return * @return
* Number of bytes transmitted. * Number of bytes transmitted.
*/ */
sock_send :: proc "c" ( sock_send :: proc "contextless" (
fd: fd_t, fd: fd_t,
/** /**
* List of scatter/gather vectors to which to retrieve data * List of scatter/gather vectors to which to retrieve data
@@ -1675,7 +1675,7 @@ sock_send :: proc "c" (
@(default_calling_convention="c") @(default_calling_convention="contextless")
foreign wasi { foreign wasi {
@(link_name="args_sizes_get") @(link_name="args_sizes_get")
wasi_args_sizes_get :: proc( wasi_args_sizes_get :: proc(