Crate yaslapi_sys

Source
Expand description

§yaslapi-sys

yaslapi-sys is a Rust library that provides raw bindings to the Yet Another Scripting Language (YASL) API.

Then run cargo build to build your project.

§Usage

Here’s an example of how to use yaslapi-sys in your Rust code:

use yaslapi_sys::YASL_State;
use std::ffi::CString;

const SRC: &str = "let x = 5; echo x**x;";
let state: *mut YASL_State = unsafe { yaslapi_sys::YASL_newstate_bb(SRC.as_ptr().cast(), SRC.len()) };
assert!(!state.is_null());

Structs§

YASLX_function
YASL_State
__atomic_wide_counter__bindgen_ty_1
__fsid_t
__once_flag
__pthread_cond_s
__pthread_internal_list
__pthread_internal_slist
__pthread_mutex_s
__pthread_rwlock_arch_t
__sigset_t
div_t
drand48_data
fd_set
imaxdiv_t
ldiv_t
lldiv_t
random_data
timespec
timeval

Constants§

BIG_ENDIAN
BYTE_ORDER
EXIT_FAILURE
EXIT_SUCCESS
FD_SETSIZE
INT8_MAX
INT8_MIN
INT16_MAX
INT16_MIN
INT32_MAX
INT32_MIN
INTPTR_MAX
INTPTR_MIN
INT_FAST8_MAX
INT_FAST8_MIN
INT_FAST16_MAX
INT_FAST16_MIN
INT_FAST32_MAX
INT_FAST32_MIN
INT_LEAST8_MAX
INT_LEAST8_MIN
INT_LEAST16_MAX
INT_LEAST16_MIN
INT_LEAST32_MAX
INT_LEAST32_MIN
LITTLE_ENDIAN
PDP_ENDIAN
PRIX8
PRIX16
PRIX32
PRIX64
PRIXFAST8
PRIXFAST16
PRIXFAST32
PRIXFAST64
PRIXLEAST8
PRIXLEAST16
PRIXLEAST32
PRIXLEAST64
PRIXMAX
PRIXPTR
PRId8
PRId16
PRId32
PRId64
PRIdFAST8
PRIdFAST16
PRIdFAST32
PRIdFAST64
PRIdLEAST8
PRIdLEAST16
PRIdLEAST32
PRIdLEAST64
PRIdMAX
PRIdPTR
PRIi8
PRIi16
PRIi32
PRIi64
PRIiFAST8
PRIiFAST16
PRIiFAST32
PRIiFAST64
PRIiLEAST8
PRIiLEAST16
PRIiLEAST32
PRIiLEAST64
PRIiMAX
PRIiPTR
PRIo8
PRIo16
PRIo32
PRIo64
PRIoFAST8
PRIoFAST16
PRIoFAST32
PRIoFAST64
PRIoLEAST8
PRIoLEAST16
PRIoLEAST32
PRIoLEAST64
PRIoMAX
PRIoPTR
PRIu8
PRIu16
PRIu32
PRIu64
PRIuFAST8
PRIuFAST16
PRIuFAST32
PRIuFAST64
PRIuLEAST8
PRIuLEAST16
PRIuLEAST32
PRIuLEAST64
PRIuMAX
PRIuPTR
PRIx8
PRIx16
PRIx32
PRIx64
PRIxFAST8
PRIxFAST16
PRIxFAST32
PRIxFAST64
PRIxLEAST8
PRIxLEAST16
PRIxLEAST32
PRIxLEAST64
PRIxMAX
PRIxPTR
PTRDIFF_MAX
PTRDIFF_MIN
RAND_MAX
SCNd8
SCNd16
SCNd32
SCNd64
SCNdFAST8
SCNdFAST16
SCNdFAST32
SCNdFAST64
SCNdLEAST8
SCNdLEAST16
SCNdLEAST32
SCNdLEAST64
SCNdMAX
SCNdPTR
SCNi8
SCNi16
SCNi32
SCNi64
SCNiFAST8
SCNiFAST16
SCNiFAST32
SCNiFAST64
SCNiLEAST8
SCNiLEAST16
SCNiLEAST32
SCNiLEAST64
SCNiMAX
SCNiPTR
SCNo8
SCNo16
SCNo32
SCNo64
SCNoFAST8
SCNoFAST16
SCNoFAST32
SCNoFAST64
SCNoLEAST8
SCNoLEAST16
SCNoLEAST32
SCNoLEAST64
SCNoMAX
SCNoPTR
SCNu8
SCNu16
SCNu32
SCNu64
SCNuFAST8
SCNuFAST16
SCNuFAST32
SCNuFAST64
SCNuLEAST8
SCNuLEAST16
SCNuLEAST32
SCNuLEAST64
SCNuMAX
SCNuPTR
SCNx8
SCNx16
SCNx32
SCNx64
SCNxFAST8
SCNxFAST16
SCNxFAST32
SCNxFAST64
SCNxLEAST8
SCNxLEAST16
SCNxLEAST32
SCNxLEAST64
SCNxMAX
SCNxPTR
SIG_ATOMIC_MAX
SIG_ATOMIC_MIN
SIZE_MAX
STACK_SIZE
UINT8_MAX
UINT16_MAX
UINT32_MAX
UINTPTR_MAX
UINT_FAST8_MAX
UINT_FAST16_MAX
UINT_FAST32_MAX
UINT_LEAST8_MAX
UINT_LEAST16_MAX
UINT_LEAST32_MAX
WCONTINUED
WEXITED
WINT_MAX
WINT_MIN
WNOHANG
WNOWAIT
WSTOPPED
WUNTRACED
YASL_DEFAULT_CPATH
YASL_DEFAULT_PATH
YASL_Error_YASL_ASSERT_ERROR
YASL_Error_YASL_DIVIDE_BY_ZERO_ERROR
YASL_Error_YASL_ERROR
YASL_Error_YASL_INIT_ERROR
YASL_Error_YASL_MODULE_SUCCESS
YASL_Error_YASL_PLATFORM_NOT_SUPP
YASL_Error_YASL_STACK_OVERFLOW_ERROR
YASL_Error_YASL_SUCCESS
YASL_Error_YASL_SYNTAX_ERROR
YASL_Error_YASL_TOO_MANY_VAR_ERROR
YASL_Error_YASL_TYPE_ERROR
YASL_Error_YASL_VALUE_ERROR
YASL_FLOAT_NAME
YASL_INT_NAME
YASL_PATH_MARK
YASL_PATH_SEP
YASL_STR_NAME
YASL_TABLE_NAME
YASL_Types_Y_BOOL
YASL_Types_Y_CFN
YASL_Types_Y_CLOSURE
YASL_Types_Y_END
YASL_Types_Y_FLOAT
YASL_Types_Y_FN
YASL_Types_Y_INT
YASL_Types_Y_LIST
YASL_Types_Y_STR
YASL_Types_Y_TABLE
YASL_Types_Y_UNDEF
YASL_Types_Y_USERDATA
YASL_Types_Y_USERPTR
YASL_VERSION
_ALLOCA_H
_ATFILE_SOURCE
_BITS_BYTESWAP_H
_BITS_ENDIANNESS_H
_BITS_ENDIAN_H
_BITS_PTHREADTYPES_ARCH_H
_BITS_PTHREADTYPES_COMMON_H
_BITS_STDINT_INTN_H
_BITS_STDINT_UINTN_H
_BITS_TIME64_H
_BITS_TYPESIZES_H
_BITS_TYPES_H
_BITS_UINTN_IDENTITY_H
_BITS_WCHAR_H
_DEFAULT_SOURCE
_ENDIAN_H
_FEATURES_H
_INTTYPES_H
_POSIX_C_SOURCE
_POSIX_SOURCE
_STDC_PREDEF_H
_STDINT_H
_STDLIB_H
_STRUCT_TIMESPEC
_SYS_CDEFS_H
_SYS_SELECT_H
_SYS_TYPES_H
_THREAD_MUTEX_INTERNAL_H
_THREAD_SHARED_TYPES_H
__BIG_ENDIAN
__BIT_TYPES_DEFINED__
__BYTE_ORDER
__FD_SETSIZE
__FLOAT_WORD_ORDER
__GLIBC_MINOR__
__GLIBC_USE_DEPRECATED_GETS
__GLIBC_USE_DEPRECATED_SCANF
__GLIBC_USE_IEC_60559_BFP_EXT
__GLIBC_USE_IEC_60559_BFP_EXT_C2X
__GLIBC_USE_IEC_60559_EXT
__GLIBC_USE_IEC_60559_FUNCS_EXT
__GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
__GLIBC_USE_IEC_60559_TYPES_EXT
__GLIBC_USE_ISOC2X
__GLIBC_USE_LIB_EXT2
__GLIBC__
__GNU_LIBRARY__
__HAVE_DISTINCT_FLOAT16
__HAVE_DISTINCT_FLOAT32
__HAVE_DISTINCT_FLOAT64
__HAVE_DISTINCT_FLOAT32X
__HAVE_DISTINCT_FLOAT64X
__HAVE_DISTINCT_FLOAT128
__HAVE_DISTINCT_FLOAT128X
__HAVE_FLOAT16
__HAVE_FLOAT32
__HAVE_FLOAT64
__HAVE_FLOAT32X
__HAVE_FLOAT64X
__HAVE_FLOAT64X_LONG_DOUBLE
__HAVE_FLOAT128
__HAVE_FLOAT128X
__HAVE_FLOATN_NOT_TYPEDEF
__HAVE_GENERIC_SELECTION
__INO_T_MATCHES_INO64_T
__KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64
__LDOUBLE_REDIRECTS_TO_FLOAT128_ABI
__LITTLE_ENDIAN
__OFF_T_MATCHES_OFF64_T
__PDP_ENDIAN
__PRI64_PREFIX
__PRIPTR_PREFIX
__PTHREAD_MUTEX_HAVE_PREV
__RLIM_T_MATCHES_RLIM64_T
__SIZEOF_PTHREAD_ATTR_T
__SIZEOF_PTHREAD_BARRIERATTR_T
__SIZEOF_PTHREAD_BARRIER_T
__SIZEOF_PTHREAD_CONDATTR_T
__SIZEOF_PTHREAD_COND_T
__SIZEOF_PTHREAD_MUTEXATTR_T
__SIZEOF_PTHREAD_MUTEX_T
__SIZEOF_PTHREAD_RWLOCKATTR_T
__SIZEOF_PTHREAD_RWLOCK_T
__STATFS_MATCHES_STATFS64
__STDC_IEC_559_COMPLEX__
__STDC_IEC_559__
__STDC_IEC_60559_BFP__
__STDC_IEC_60559_COMPLEX__
__STDC_ISO_10646__
__SYSCALL_WORDSIZE
__TIMESIZE
__USE_ATFILE
__USE_FORTIFY_LEVEL
__USE_ISOC11
__USE_ISOC95
__USE_ISOC99
__USE_MISC
__USE_POSIX
__USE_POSIX2
__USE_POSIX199309
__USE_POSIX199506
__USE_POSIX_IMPLICITLY
__USE_XOPEN2K
__USE_XOPEN2K8
__WALL
__WCLONE
__WCOREFLAG
__WNOTHREAD
__WORDSIZE
__WORDSIZE_TIME64_COMPAT32
__W_CONTINUED
____gwchar_t_defined
__bool_true_false_are_defined
__clock_t_defined
__clockid_t_defined
__glibc_c99_flexarr_available
__have_pthread_attr_t
__ldiv_t_defined
__lldiv_t_defined
__sigset_t_defined
__time_t_defined
__timer_t_defined
__timeval_defined
false_
true_

Statics§

LIST_NAME
TABLE_NAME

Functions§

YASLX_checknbool
Returns the nth position of the stack if it is a bool. Otherwise, causes a type error, along with a printed error message. @param S The YASL_State. @param name Name of the function in which this is called, used for error message. @param pos the position of the argument. @return the nth position of the stack if it’s a bool, otherwise no return.
YASLX_checknfloat
Returns the nth position of the stack if it is a float. Otherwise, causes a type error, along with a printed error message. @param S The YASL_State. @param name Name of the function in which this is called, used for error message. @param pos the position of the argument. @return the nth position of the stack if it’s a float, otherwise no return.
YASLX_checknint
Returns the nth position of the stack if it is an int. Otherwise, causes a type error, along with a printed error message. @param S The YASL_State. @param name Name of the function in which this is called, used for error message. @param pos the position of the argument. @return the nth position of the stack if it’s an int, otherwise no return.
YASLX_checknundef
Checks that the nth position of the stack if it is undef. Otherwise, causes a type error, along with a printed error message. @param S The YASL_State. @param name Name of the function in which this is called, used for error message. @param pos the position of the argument.
YASLX_checknuserdata
Returns the nth position of the stack if it is a userdata with a matching tag. Otherwise, causes a type error, along with a printed error message. @param S The YASL_State. @param tag The tag of the userdata. @param name Name of the function in which this is called, used for error message. @param pos the position of the argument, used only for the error message. @return the nth position of the stack if it’s a userdata, otherwise no return.
YASLX_decllibs
Loads all standard libraries into the appropriate state and declares them all with their default names. @param S The state onto which to load the libraries. @return YASL_SUCESS on success, else error code.
YASLX_initglobal
Declares a global and initializes it with the top value from the stack. @param S the YASL_State. @param name name of the global (nul-terminated). @return
YASLX_print_err_bad_arg_type
Prints an error message @param S The YASL State. @param fn_name name of the function in which the error occured. @param position which arg had the wrong type. @param exp expected type of the arg. @param act actual type of the arg.
YASLX_tablesetfunctions
Inserts all functions in the array into a table on top of the stack. @param S The YASL_State @param functions array of function names, function pointers, and number of args.
YASL_compile
[-0, +0] compiles the source for the given YASL_State, but doesn’t run it. @param S the YASL_State containing the YASL source code to be compiled. @return 0 on success, otherwise an error code.
YASL_declglobal
[-0, +0] Declares a global for use in the given YASL_State. YASL does not handle the lifetime of the string; normally a literal is used. @param S the YASL_State in which to declare the global. @param name the name of the global (null-terminated string). @return YASL_SUCCESS on success, otherwise an error code.
YASL_decllib_collections
YASL_decllib_error
YASL_decllib_io
YASL_decllib_math
YASL_decllib_mt
YASL_decllib_os
YASL_decllib_require
YASL_decllib_require_c
YASL_delstate
deletes the given YASL_State. @param S YASL_State to be deleted. @return 0 on success, otherwise an error code.
YASL_duptop
[-0, +1] Duplicates the top of the stack. @param S the YASL_State. @return YASL_SUCCESS on success, otherwise an error code.
YASL_execute
[-0, +0] Execute the bytecode for the given YASL_State. @param S the YASL_State to use to execute the bytecode. @return 0 on successful execution, else an error code.
YASL_execute_REPL
[-0, +0] Execute the bytecode for the given YASL_State in REPL mode. The only difference between YASL_execute_REPL and YASL_execute is that YASL_execute_REPL will print the last statement passed to it if that statement is an expression. @param S the YASL_State to use to execute the bytecode. @return 0 on successful execution, else an error code.
YASL_functioncall
[-(n+1), +r] Calls a function with n parameters. The function should be located below all n parameters it will be called with. The left-most parameter is placed directly above the function, the right-most paramter at the top of the stack. @param S the YASL_State @param n @return r, the number of return values of the called functions
YASL_isbool
[-0, +0] checks if the top of the stack is bool. @param S the YASL_State. @return true if the top of the stack is bool, else false.
YASL_isfloat
[-0, +0] checks if the top of the stack is float. @param S the YASL_State. @return true if the top of the stack is float, else false.
YASL_isint
[-0, +0] checks if the top of the stack is int. @param S the YASL_State. @return true if the top of the stack is int, else false.
YASL_islist
[-0, +0] checks if the top of the stack is list. @param S the YASL_State. @return true if the top of the stack is list, else false.
YASL_isnbool
[-0, +0] checks if the object at index n is bool. @param S the YASL_State. @return true if the object at index n is bool, else false.
YASL_isnfloat
[-0, +0] checks if the object at index n is float. @param S the YASL_State. @return true if the object at index n is float, else false.
YASL_isnint
[-0, +0] checks if the object at index n is int. @param S the YASL_State. @return true if the object at index n is int, else false.
YASL_isnlist
[-0, +0] checks if the object at index n is list. @param S the YASL_State. @return true if the object at index n is list, else false.
YASL_isnstr
[-0, +0] checks if the object at index n is str. @param S the YASL_State to which the stack belongs. @return true if the object at index n is str, else false.
YASL_isntable
[-0, +0] checks if the object at index n is table. @param S the YASL_State to which the stack belongs. @return true if the object at index n is table, else false.
YASL_isnundef
[-0, +0] Checks if the object at index n is undef. @param S the YASL_State to which the stack belongs. @return true if the object at index n is undef, else false.
YASL_isnuserdata
[-0, +0] checks if the object at index n is userdata. @param S the YASL_State. @return true if the object at index n is userdata, else false.
YASL_isnuserptr
[-0, +0] checks if the object at index n is userpointer. @param S the YASL_State. @return true if the object at index n is userpointer, else false.
YASL_isstr
[-0, +0] checks if the top of the stack is str. @param S the YASL_State. @return true if the top of the stack is str, else false.
YASL_istable
[-0, +0] checks if the top of the stack is table. @param S the YASL_State. @return true if the top of the stack is table, else false.
YASL_isundef
[-0, +0] Checks if the top of the stack is undef. @param S the YASL_State. @return true if the top of the stack is undef, else false.
YASL_isuserdata
[-0, +0] checks if the top of the stack is userdata. @param S the YASL_State. @return true if the top of the stack is userdata, else false.
YASL_isuserptr
[-0, +0] checks if the top of the stack is userpointer. @param S the YASL_State. @return true if the top of the stack is userpointer, else false.
YASL_len
[+1, -1] Pops the top of the stack, the evalutes len x, where x is the popped value. The result is pushed on top of the stack. @param S the YASL_State.
YASL_listget
[+1, -0] Indexes the list on top of the stack and pushes the result on top of the stack. @param S the YASL_State. @param n the index to use on the list. @return YASL_SUCCESS on
YASL_listpush
[-1, +0] Pops the top of the stack and appends it to a list (which should be located directly below the top of the stack). @param S the YASL_State. @return YASL_SUCCESS on sucess, else an error code.
YASL_loadglobal
[-0, +1] Loads a global and puts it on top of the stack. @param S the YASL_State. @param name nul-terminated name of the global. @return YASL_SUCCESS on success, otherwise an error code.
YASL_loadmt
[-0, +1] Loads a metatable by name. @param S the YASL_State. @param name name of the metatable. @return YASL_SUCCESS on success, else an error code.
YASL_loadprinterr
YASL_loadprintout
YASL_newstate
Initialises a new YASL_State for usage. @param filename the name of the file used to initialize the state. @return the new YASL_State, or NULL on failure.
YASL_newstate_bb
initialises a new YASL_State for usage, or NULL on failure. @param buf buffer containing the source code used to initialize the state. @param len the length of the buffer. @return the new YASL_State
YASL_peekbool
[-0, +0] Returns the bool value of the top of the stack, if it is a boolean. Otherwise returns false. Does not modify the stack. @param S the YASL_State. @return
YASL_peekcstr
[-0, +0] Returns a copy of the str value of the top of the stack, if the top of the stack is a str. Otherwise returns 0. Does not modify the stack. @param S the YASL_State. @return the value of the str on top of the stack, or NULL if it’s not a str.
YASL_peekfloat
[-0, +0] Returns the float value of the top of the stack, if the top of the stack is a float. Otherwise returns 0.0. Does not modify the stack. @param S the YASL_State. @return
YASL_peekint
[-0, +0] Returns the int value of the top of the stack, if the top of the stack is an int. Otherwise returns 0. Does not modify the stack. @param S the YASL_State. @return the value of the int on top of the stack, or 0 if it’s not an int.
YASL_peeknbool
[-0, +0] Returns the bool value at index n, if it is a boolean. Otherwise returns false. Does not modify the stack. @param S @return
YASL_peeknfloat
[-0, +0] Returns the float value at index n, if it is a float. Otherwise returns 0.0. Does not modify the stack. @param S @return
YASL_peeknint
[-0, +0] Returns the int value at index n, if it is an int. Otherwise returns 0. Does not modify the stack. @param S the YASL_State. @return the value of the int at index n, or 0 if it’s not an int.
YASL_peekntype
[-0, +0] returns the type of object at index n. @param S the YASL_State. @return the type on top of the stack.
YASL_peekntypename
[-0, +0] returns the type of index n as a string. @param S the YASL_State. @return the string representation of the type of index n.
YASL_peeknuserdata
[-0, +0] Returns the userdata value at index n, if it is a userdata. Otherwise returns NULL. Does not modify the stack. @param S the YASL_State. @return the userdata value at index n, or NULL if it’s not a userdata.
YASL_peektype
[-0, +0] returns the type of the top of the stack. @param S the YASL_State. @return the type on top of the stack.
YASL_peektypename
[-0, +0] returns the type of the top of the stack as a string. @param S the YASL_State to which the stack belongs. @return the string representation of the type on top of the stack.
YASL_peekuserdata
[-0, +0] Returns the userdata value of the top of the stack, if the top of the stack is a userdata. Otherwise returns NULL. Does not modify the stack. @param S the YASL_State. @return the userdata value on top of the stack, or NULL if it’s not a userdata.
YASL_peekuserptr
[-0, +0] Returns the userptr value of the top of the stack, if the top of the stack is a userptr. Otherwise returns NULL. Does not modify the stack. @param S the YASL_State. @return the value of the userptr on top of the stack, or NULL if it’s not a userptr.
YASL_peekvargscount
YASL_pop
[-1, +0] Removes the top of the stack. @param S the YASL_State the stack belongs to.
YASL_popbool
[-1, +0] Returns the bool value of the top of the stack, if the top of the stack is a boolean. Otherwise returns false. Removes the top element of the stack. @param S the YASL_State. @return the bool value of the top of the stack.
YASL_popcstr
[-1, +0] Returns the str value (nul-terminated) of the top of the stack, if the top of the stack is a str. Otherwise returns NULL. @param S the YASL_State. @return the value of the str on top of the stack, or NULL if it’s not a str.
YASL_popfloat
[-1, +0] Returns the float value of the top of the stack, if the top of the stack is a float. Otherwise returns 0.0. Removes the top of the stack. @param S the YASL_State. @return the float value on top of the stack.
YASL_popint
[-1, +0] Returns the int value of the top of the stack, if the top of the stack is an int. Otherwise returns 0. Removes the top of the stack. @param S the YASL_State. @return the int value of the top of the stack.
YASL_popuserdata
YASL_popuserptr
YASL_print_err
[-0, +0] Prints a runtime error. @param S the YASL_State in which the error occurred. @param fmt a format string, taking the same parameters as printf. @param … var args for the above format strings.
YASL_pushbool
[-0, +1] Pushes a boolean value onto the stack. @param S the YASL_State onto which to push the boolean. @param value boolean to be pushed onto the stack.
YASL_pushcfunction
[-0, +1] Pushes a function pointer onto the stack @param S the YASL_State onto which to push the string. @param value the function pointer to be pushed onto the stack.
YASL_pushfloat
[-0, +1] Pushes a double value onto the stack. @param S the YASL_State onto which to push the double. @param value the float to push onto the stack.
YASL_pushint
[-0, +1] Pushes an integer value onto the stack. @param S the YASL_State onto which to push the integer. @param integer to be pushed onto the stack.
YASL_pushlist
[-0, +1] Pushes an empty list onto the stack. @param S the YASL_State onto which to push the list.
YASL_pushlit
[-0, +1] Pushes a nul-terminated string onto the stack. This memory will not be managed by YASL, and must outlive S. @param S the YASL_State. @param value nul-terminated string to be pushed onto the stack.
YASL_pushlstr
[-0, +1] Pushes a string with length len onto the stack. YASL makes a copy of the given string, and manages the memory for it. The string may have embedded 0s. @param S the YASL_State. @param value the string to be pushed onto the stack. @param len the length of value.
YASL_pushtable
[-0, +1] Pushes an empty table onto the stack. @param S the YASL_State onto which to push the table.
YASL_pushundef
[-0, +1] Pushes an undef value onto the stack. @param S the YASL_State onto which to push the undef.
YASL_pushuserdata
[-0, +1] Pushes a user-pointer onto the stack @param S the YASL_State onto which to push the user-pointer. @param userpointer the user-pointer to push onto the stack.
YASL_pushuserptr
[-0, +1] Pushes a user-pointer onto the stack @param S the YASL_State onto which to push the user-pointer. @param userpointer the user-pointer to push onto the stack.
YASL_pushzstr
Pushes a nul-terminated string onto the stack. YASL makes a copy of the given string, and manages the memory for it. The string may not have embedded 0s; it is assumed to end at the first 0. @param S the YASL_State. @param value the string to be pushed onto the stack (nul-terminated).
YASL_registermt
[-0, +0] Registers a metatable with name name. After this returns, the metatable can be referred to by name in other functions dealing with metatables, e.g. YASL_setmt or YASL_loadmt. @param S the YASL_State. @param name the name of the metatable. @return YASL_SUCCESS.
YASL_resetstate
resets S to the same state it would be in if newly created using YASL_newstate. @param S the YASL_State @param filename the name of the file used to initialize S @return YASL_SUCCESS if successful, otherwise an error.
YASL_resetstate_bb
resets S to the same state it would be in if newly created using YASL_newstate_bb. @param S the YASL_State. @param buf the buffer used to initialize S. @param len the length of buf. @return YASL_SUCCESS on success, else an error code.
YASL_setglobal
[-1, +0] Pops the top of the YASL stack and stores it in the given global. @param S the YASL_State in which to store the global. @param name the name of the global. @return YASL_SUCCESS on success, otherwise an error code.
YASL_setmt
YASL_setprinterr_tostr
YASL_setprintout_tostr
YASL_stringifytop
YASL_tablenext
[-1, +2] Iterates over a table. The topmost item of the stack should be the previous index in the table, followed by the table itself. The index is popped, and then if there are more elements in the table, the next index and value are pushed. No values are pushed if we are already at the end of the table. @param S the YASL_State. @return true if there was a next element, otherwise false.
YASL_tableset
[-2, +0] inserts a key-value pair into the table. The topmost items is value, then key, then table. The key and value are popped from the stack. @param S the YASL_State which has the 3 items on top of the stack. @return 0 on success, else error code
YASL_throw_err
[-0, +0] Causes a fatal error. @param S the YASL_State in which the error occured. @param error the error code.
_Exit
__ctype_get_mb_cur_max
a64l
abort
abs
aligned_alloc
alloca
at_quick_exit
atexit
atof
atoi
atol
atoll
bsearch
calloc
clearenv
div
drand48
drand48_r
ecvt
ecvt_r
erand48
erand48_r
exit
fcvt
fcvt_r
free
gcvt
getenv
getloadavg
getsubopt
imaxabs
imaxdiv
initstate
initstate_r
jrand48
jrand48_r
l64a
labs
lcong48
lcong48_r
ldiv
llabs
lldiv
lrand48
lrand48_r
malloc
mblen
mbstowcs
mbtowc
mkdtemp
mkstemp
mkstemps
mktemp
mrand48
mrand48_r
nrand48
nrand48_r
on_exit
posix_memalign
pselect
putenv
qecvt
qecvt_r
qfcvt
qfcvt_r
qgcvt
qsort
quick_exit
rand
rand_r
random
random_r
realloc
reallocarray
realpath
rpmatch
seed48
seed48_r
select
setenv
setstate
setstate_r
srand
srand48
srand48_r
srandom
srandom_r
strtod
strtof
strtoimax
strtol
strtold
strtoll
strtoq
strtoul
strtoull
strtoumax
strtouq
system
unsetenv
valloc
wcstoimax
wcstombs
wcstoumax
wctomb

Type Aliases§

YASL_Error
YASL_Types
YASL_cfn
Typedef for YASL functions defined through the C API.
_Float32
_Float64
_Float32x
_Float64x
__blkcnt64_t
__blkcnt_t
__blksize_t
__caddr_t
__clock_t
__clockid_t
__compar_fn_t
__daddr_t
__dev_t
__fd_mask
__fsblkcnt64_t
__fsblkcnt_t
__fsfilcnt64_t
__fsfilcnt_t
__fsword_t
__gid_t
__gwchar_t
__id_t
__ino64_t
__ino_t
__int8_t
__int16_t
__int32_t
__int64_t
__int_least8_t
__int_least16_t
__int_least32_t
__int_least64_t
__intmax_t
__intptr_t
__key_t
__loff_t
__mode_t
__nlink_t
__off64_t
__off_t
__pid_t
__pthread_list_t
__pthread_slist_t
__quad_t
__rlim64_t
__rlim_t
__sig_atomic_t
__socklen_t
__ssize_t
__suseconds64_t
__suseconds_t
__syscall_slong_t
__syscall_ulong_t
__thrd_t
__time_t
__timer_t
__tss_t
__u_char
__u_int
__u_long
__u_quad_t
__u_short
__uid_t
__uint8_t
__uint16_t
__uint32_t
__uint64_t
__uint_least8_t
__uint_least16_t
__uint_least32_t
__uint_least64_t
__uintmax_t
__useconds_t
blkcnt_t
blksize_t
caddr_t
clock_t
clockid_t
daddr_t
dev_t
fd_mask
fsblkcnt_t
fsfilcnt_t
fsid_t
gid_t
id_t
ino_t
int_fast8_t
int_fast16_t
int_fast32_t
int_fast64_t
int_least8_t
int_least16_t
int_least32_t
int_least64_t
intmax_t
key_t
loff_t
mode_t
nlink_t
off_t
pid_t
pthread_key_t
pthread_once_t
pthread_spinlock_t
pthread_t
quad_t
register_t
sigset_t
suseconds_t
time_t
timer_t
u_char
u_int
u_int8_t
u_int16_t
u_int32_t
u_int64_t
u_long
u_quad_t
u_short
uid_t
uint
uint_fast8_t
uint_fast16_t
uint_fast32_t
uint_fast64_t
uint_least8_t
uint_least16_t
uint_least32_t
uint_least64_t
uintmax_t
ulong
ushort
wchar_t

Unions§

__atomic_wide_counter
pthread_attr_t
pthread_barrier_t
pthread_barrierattr_t
pthread_cond_t
pthread_condattr_t
pthread_mutex_t
pthread_mutexattr_t
pthread_rwlock_t
pthread_rwlockattr_t