File size: 10,194 Bytes
3dcad1f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 |
@c module-for-docstring (guile)
@deffn {Scheme Procedure} uniform-array->bytevector array
@deffnx {C Function} scm_uniform_array_to_bytevector (array)
Return a newly allocated bytevector whose contents
will be copied from the uniform array @var{array}.
@end deffn
@deffn {Scheme Procedure} %start-stack id thunk
@deffnx {C Function} scm_sys_start_stack (id, thunk)
Call @var{thunk} on an evaluator stack tagged with @var{id}.
@end deffn
@deffn {Scheme Procedure} guardian-destroyed? guardian
@deffnx {C Function} scm_guardian_destroyed_p (guardian)
Return @code{#t} if @var{guardian} has been destroyed, otherwise @code{#f}.
@end deffn
@deffn {Scheme Procedure} guardian-greedy? guardian
@deffnx {C Function} scm_guardian_greedy_p (guardian)
Return @code{#t} if @var{guardian} is a greedy guardian, otherwise @code{#f}.
@end deffn
@deffn {Scheme Procedure} destroy-guardian! guardian
@deffnx {C Function} scm_destroy_guardian_x (guardian)
Destroys @var{guardian}, by making it impossible to put any more
objects in it or get any objects from it. It also unguards any
objects guarded by @var{guardian}.
@end deffn
@deffn {Scheme Procedure} gc-dump
@deffnx {C Function} scm_gc_dump ()
Dump information about the garbage collector's internal data structures and memory usage to the standard output.
@end deffn
@deffn {Scheme Procedure} gc-disable
@deffnx {C Function} scm_gc_disable ()
Disables the garbage collector. Nested calls are permitted. GC is re-enabled once @code{gc-enable} has been called the same number of times @code{gc-disable} was called.
@end deffn
@deffn {Scheme Procedure} gc-enable
@deffnx {C Function} scm_gc_enable ()
Enables the garbage collector.
@end deffn
@deffn {Scheme Procedure} make-generalized-vector type len [fill]
@deffnx {C Function} scm_make_generalized_vector (type, len, fill)
Make a generalized vector
@end deffn
@deffn {Scheme Procedure} set-primitive-generic! subr generic
@deffnx {C Function} scm_set_primitive_generic_x (subr, generic)
@end deffn
@deffn {Scheme Procedure} nl-langinfo item [locale]
@deffnx {C Function} scm_nl_langinfo (item, locale)
Return a string denoting locale information for @var{item} in the current locale or that specified by @var{locale}. The semantics and arguments are the same as those of the X/Open @code{nl_langinfo} function (@pxref{The Elegant and Fast Way, @code{nl_langinfo},, libc, The GNU C Library Reference Manual}).
@end deffn
@deffn {Scheme Procedure} %warn-autocompilation-enabled
@deffnx {C Function} scm_sys_warn_autocompilation_enabled ()
@end deffn
@deffn {Scheme Procedure} make-syncase-macro type binding
@deffnx {C Function} scm_make_syncase_macro (type, binding)
Return a @dfn{macro} that requires expansion by syntax-case.
While users should not call this function, it is useful to know
that syntax-case macros are represented as Guile primitive macros.
@end deffn
@deffn {Scheme Procedure} make-extended-syncase-macro m type binding
@deffnx {C Function} scm_make_extended_syncase_macro (m, type, binding)
Extend a core macro @var{m} with a syntax-case binding.
@end deffn
@deffn {Scheme Procedure} syncase-macro-type m
@deffnx {C Function} scm_syncase_macro_type (m)
Return the type of the macro @var{m}.
@end deffn
@deffn {Scheme Procedure} syncase-macro-binding m
@deffnx {C Function} scm_syncase_macro_binding (m)
Return the binding of the macro @var{m}.
@end deffn
@deffn {Scheme Procedure} memoize-expression exp
@deffnx {C Function} scm_memoize_expression (exp)
Memoize the expression @var{exp}.
@end deffn
@deffn {Scheme Procedure} unmemoize-expression m
@deffnx {C Function} scm_unmemoize_expression (m)
Unmemoize the memoized expression @var{m}.
@end deffn
@deffn {Scheme Procedure} memoized-expression-typecode m
@deffnx {C Function} scm_memoized_expression_typecode (m)
Return the typecode from the memoized expression @var{m}.
@end deffn
@deffn {Scheme Procedure} memoized-expression-data m
@deffnx {C Function} scm_memoized_expression_data (m)
Return the data from the memoized expression @var{m}.
@end deffn
@deffn {Scheme Procedure} memoized-typecode sym
@deffnx {C Function} scm_memoized_typecode (sym)
Return the memoized typecode corresponding to the symbol @var{sym}.
@end deffn
@deffn {Scheme Procedure} memoize-variable-access! m mod
@deffnx {C Function} scm_memoize_variable_access_x (m, mod)
Look up and cache the variable that @var{m} will access, returning the variable.
@end deffn
@deffn {Scheme Procedure} module-local-variable module sym
@deffnx {C Function} scm_module_local_variable (module, sym)
Return the variable bound to @var{sym} in @var{module}. Return @code{#f} is @var{sym} is not bound locally in @var{module}.
@end deffn
@deffn {Scheme Procedure} module-variable module sym
@deffnx {C Function} scm_module_variable (module, sym)
Return the variable bound to @var{sym} in @var{module}. This may be both a local variable or an imported variable. Return @code{#f} is @var{sym} is not bound in @var{module}.
@end deffn
@deffn {Scheme Procedure} eval-closure-module eval_closure
@deffnx {C Function} scm_eval_closure_module (eval_closure)
Return the module associated with this eval closure.
@end deffn
@deffn {Scheme Procedure} module-transformer module
@deffnx {C Function} scm_module_transformer (module)
Returns the syntax expander for the given module.
@end deffn
@deffn {Scheme Procedure} module-public-interface module
@deffnx {C Function} scm_module_public_interface (module)
Return the public interface of @var{module}.
If @var{module} has no public interface, @code{#f} is returned.
@end deffn
@deffn {Scheme Procedure} define! sym value
@deffnx {C Function} scm_define (sym, value)
Define @var{sym} to be @var{value} in the current module.Returns the variable itself. Note that this is a procedure, not a macro.
@end deffn
@deffn {Scheme Procedure} module-reverse-lookup module variable
@deffnx {C Function} scm_module_reverse_lookup (module, variable)
Return the symbol under which @var{variable} is bound in @var{module} or @var{#f} if @var{variable} is not visible from @var{module}. If @var{module} is @code{#f}, then the pre-module obarray is used.
@end deffn
@deffn {Scheme Procedure} cddr x
@deffnx {C Function} scm_cddr (x)
@end deffn
@deffn {Scheme Procedure} make-promise thunk
@deffnx {C Function} scm_make_promise (thunk)
Create a new promise object.
@code{make-promise} is a procedural form of @code{delay}.
These two expressions are equivalent:
@lisp
(delay @var{exp})
(make-promise (lambda () @var{exp}))
@end lisp
@end deffn
@deffn {Scheme Procedure} %get-stack-size
@deffnx {C Function} scm_sys_get_stack_size ()
Return the current thread's C stack size (in Scheme objects).
@end deffn
@deffn {Scheme Procedure} %string-dump str
@deffnx {C Function} scm_sys_string_dump (str)
Returns an association list containing debugging information
for @var{str}. The association list has the following entries.@table @code
@item string
The string itself.
@item start
The start index of the string into its stringbuf
@item length
The length of the string
@item shared
If this string is a substring, it returns its parent string.
Otherwise, it returns @code{#f}
@item read-only
@code{#t} if the string is read-only
@item stringbuf-chars
A new string containing this string's stringbuf's characters
@item stringbuf-length
The number of characters in this stringbuf
@item stringbuf-shared
@code{#t} if this stringbuf is shared
@item stringbuf-wide
@code{#t} if this stringbuf's characters are stored in a
32-bit buffer, or @code{#f} if they are stored in an 8-bit
buffer
@end table
@end deffn
@deffn {Scheme Procedure} %symbol-dump sym
@deffnx {C Function} scm_sys_symbol_dump (sym)
Returns an association list containing debugging information
for @var{sym}. The association list has the following entries.@table @code
@item symbol
The symbol itself
@item hash
Its hash value
@item interned
@code{#t} if it is an interned symbol
@item stringbuf-chars
A new string containing this symbols's stringbuf's characters
@item stringbuf-length
The number of characters in this stringbuf
@item stringbuf-shared
@code{#t} if this stringbuf is shared
@item stringbuf-wide
@code{#t} if this stringbuf's characters are stored in a
32-bit buffer, or @code{#f} if they are stored in an 8-bit
buffer
@end table
@end deffn
@deffn {Scheme Procedure} string-bytes-per-char string
@deffnx {C Function} scm_string_bytes_per_char (string)
Return the bytes used to represent a character in @var{string}.This will return 1 or 4.
@end deffn
@deffn {Scheme Procedure} uniform-vector-element-type v
@deffnx {C Function} scm_uniform_vector_element_type (v)
Return the type of the elements in the uniform vector, @var{v}.
@end deffn
@deffn {Scheme Procedure} uniform-vector-element-size v
@deffnx {C Function} scm_uniform_vector_element_size (v)
Return the number of bytes allocated to each element in the
uniform vector, @var{v}.
@end deffn
@deffn {Scheme Procedure} canonicalize-path path
@deffnx {C Function} scm_canonicalize_path (path)
Return the canonical path of @var{path}. A canonical path has
no @code{.} or @code{..} components, nor any repeated path
separators (@code{/}) nor symlinks.
Raises an error if any component of @var{path} does not exist.
@end deffn
@deffn {Scheme Procedure} getrlimit resource
@deffnx {C Function} scm_getrlimit (resource)
Get a resource limit for this process. @var{resource} identifies the resource,
either as an integer or as a symbol. For example, @code{(getrlimit 'stack)}
gets the limits associated with @code{RLIMIT_STACK}.
@code{getrlimit} returns two values, the soft and the hard limit. If no
limit is set for the resource in question, the returned limit will be @code{#f}.
@end deffn
@deffn {Scheme Procedure} setrlimit resource soft hard
@deffnx {C Function} scm_setrlimit (resource, soft, hard)
Set a resource limit for this process. @var{resource} identifies the resource,
either as an integer or as a symbol. @var{soft} and @var{hard} should be integers,
or @code{#f} to indicate no limit (i.e., @code{RLIM_INFINITY}).
For example, @code{(setrlimit 'stack 150000 300000)} sets the @code{RLIMIT_STACK}
limit to 150 kilobytes, with a hard limit of 300 kB.
@end deffn
|