1 This file gathers entries that have been automatically generated from
2 docstrings in libguile. They are not included in the manual, however,
3 for various reasons, mostly because they have been deprecated. They
4 are here in this file to give docstring.el a chance to update them
7 - The 'environments' are only in Guile by accident and are not used at
8 all and we don't want to advertise them.
10 - GOOPS is documented in its own manual.
14 @deffn {Scheme Procedure} substring-move-right!
15 implemented by the C function "scm_substring_move_x"
18 @deffn {Scheme Procedure} substring-move-left!
19 implemented by the C function "scm_substring_move_x"
22 @deffn {Scheme Procedure} gentemp [prefix [obarray]]
23 @deffnx {C Function} scm_gentemp (prefix, obarray)
24 Create a new symbol with a name unique in an obarray.
25 The name is constructed from an optional string @var{prefix}
26 and a counter value. The default prefix is @code{t}. The
27 @var{obarray} is specified as a second optional argument.
28 Default is the system obarray where all normal symbols are
29 interned. The counter is increased by 1 at each
30 call. There is no provision for resetting the counter.
33 @deffn {Scheme Procedure} symbol-set! o s v
34 @deffnx {C Function} scm_symbol_set_x (o, s, v)
35 Find the symbol in @var{obarray} whose name is @var{string}, and rebind
36 it to @var{value}. An error is signalled if @var{string} is not present
40 @deffn {Scheme Procedure} symbol-bound? o s
41 @deffnx {C Function} scm_symbol_bound_p (o, s)
42 Return @code{#t} if @var{obarray} contains a symbol with name
43 @var{string} bound to a defined value. This differs from
44 @var{symbol-interned?} in that the mere mention of a symbol
45 usually causes it to be interned; @code{symbol-bound?}
46 determines whether a symbol has been given any meaningful
50 @deffn {Scheme Procedure} symbol-binding o s
51 @deffnx {C Function} scm_symbol_binding (o, s)
52 Look up in @var{obarray} the symbol whose name is @var{string}, and
53 return the value to which it is bound. If @var{obarray} is @code{#f},
54 use the global symbol table. If @var{string} is not interned in
55 @var{obarray}, an error is signalled.
58 @deffn {Scheme Procedure} unintern-symbol o s
59 @deffnx {C Function} scm_unintern_symbol (o, s)
60 Remove the symbol with name @var{string} from @var{obarray}. This
61 function returns @code{#t} if the symbol was present and @code{#f}
65 @deffn {Scheme Procedure} intern-symbol o s
66 @deffnx {C Function} scm_intern_symbol (o, s)
67 Add a new symbol to @var{obarray} with name @var{string}, bound to an
68 unspecified initial value. The symbol table is not modified if a symbol
69 with this name is already present.
72 @deffn {Scheme Procedure} string->obarray-symbol o s [softp]
73 @deffnx {C Function} scm_string_to_obarray_symbol (o, s, softp)
74 Intern a new symbol in @var{obarray}, a symbol table, with name
77 If @var{obarray} is @code{#f}, use the default system symbol table. If
78 @var{obarray} is @code{#t}, the symbol should not be interned in any
79 symbol table; merely return the pair (@var{symbol}
80 . @var{#<undefined>}).
82 The @var{soft?} argument determines whether new symbol table entries
83 should be created when the specified symbol is not already present in
84 @var{obarray}. If @var{soft?} is specified and is a true value, then
85 new entries should not be added for symbols not already present in the
86 table; instead, simply return @code{#f}.
89 @deffn {Scheme Procedure} read-and-eval! [port]
90 @deffnx {C Function} scm_read_and_eval_x (port)
91 Read a form from @var{port} (standard input by default), and evaluate it
92 (memoizing it in the process) in the top-level environment. If no data
93 is left to be read from @var{port}, an @code{end-of-file} error is
97 @deffn {Scheme Procedure} sloppy-member x lst
98 @deffnx {C Function} scm_sloppy_member (x, lst)
99 This procedure behaves like @code{member}, but does no type or error checking.
100 Its use is recommended only in writing Guile internals,
101 not for high-level Scheme programs.
104 @deffn {Scheme Procedure} sloppy-memv x lst
105 @deffnx {C Function} scm_sloppy_memv (x, lst)
106 This procedure behaves like @code{memv}, but does no type or error checking.
107 Its use is recommended only in writing Guile internals,
108 not for high-level Scheme programs.
111 @deffn {Scheme Procedure} sloppy-memq x lst
112 @deffnx {C Function} scm_sloppy_memq (x, lst)
113 This procedure behaves like @code{memq}, but does no type or error checking.
114 Its use is recommended only in writing Guile internals,
115 not for high-level Scheme programs.
118 @deffn {Scheme Procedure} builtin-variable name
119 @deffnx {C Function} scm_builtin_variable (name)
120 Do not use this function.
123 @deffn {Scheme Procedure} variable-set-name-hint! var hint
124 @deffnx {C Function} scm_variable_set_name_hint (var, hint)
125 Do not use this function.
128 @deffn {Scheme Procedure} close-all-ports-except . ports
129 @deffnx {C Function} scm_close_all_ports_except (ports)
130 [DEPRECATED] Close all open file ports used by the interpreter
131 except for those supplied as arguments. This procedure
132 was intended to be used before an exec call to close file descriptors
133 which are not needed in the new process. However it has the
134 undesirable side effect of flushing buffers, so it's deprecated.
135 Use port-for-each instead.
138 @deffn {Scheme Procedure} c-clear-registered-modules
139 @deffnx {C Function} scm_clear_registered_modules ()
140 Destroy the list of modules registered with the current Guile process.
141 The return value is unspecified. @strong{Warning:} this function does
142 not actually unlink or deallocate these modules, but only destroys the
143 records of which modules have been loaded. It should therefore be used
144 only by module bookkeeping operations.
147 @deffn {Scheme Procedure} c-registered-modules
148 @deffnx {C Function} scm_registered_modules ()
149 Return a list of the object code modules that have been imported into
150 the current Guile process. Each element of the list is a pair whose
151 car is the name of the module, and whose cdr is the function handle
152 for that module's initializer function. The name is the string that
153 has been passed to scm_register_module_xxx.
156 @deffn {Scheme Procedure} module-import-interface module sym
157 @deffnx {C Function} scm_module_import_interface (module, sym)
162 @deffn {Scheme Procedure} self-evaluating? obj
163 @deffnx {C Function} scm_self_evaluating_p (obj)
164 Return #t for objects which Guile considers self-evaluating
167 @deffn {Scheme Procedure} unmemoize-expr m
168 @deffnx {C Function} scm_i_unmemoize_expr (m)
169 Unmemoize the memoized expression @var{m},
172 @deffn {Scheme Procedure} weak-key-alist-vector? obj
173 @deffnx {Scheme Procedure} weak-value-alist-vector? obj
174 @deffnx {Scheme Procedure} doubly-weak-alist-vector? obj
175 @deffnx {C Function} scm_weak_key_alist_vector_p (obj)
176 Return @code{#t} if @var{obj} is the specified weak hash
177 table. Note that a doubly weak hash table is neither a weak key
178 nor a weak value hash table.
181 @deffn {Scheme Procedure} make-weak-key-alist-vector [size]
182 @deffnx {Scheme Procedure} make-weak-value-alist-vector size
183 @deffnx {Scheme Procedure} make-doubly-weak-alist-vector size
184 @deffnx {C Function} scm_make_weak_key_alist_vector (size)
185 Return a weak hash table with @var{size} buckets. As with any
186 hash table, choosing a good size for the table requires some
189 You can modify weak hash tables in exactly the same way you
190 would modify regular hash tables. (@pxref{Hash Tables})
193 @deffn {Scheme Procedure} include-deprecated-features
194 Return @code{#t} iff deprecated features should be included
195 in public interfaces.
198 @deffn {Scheme Procedure} issue-deprecation-warning . msgs
199 Output @var{msgs} to @code{(current-error-port)} when this
200 is the first call to @code{issue-deprecation-warning} with
201 this specific @var{msg}. Do nothing otherwise.
202 The argument @var{msgs} should be a list of strings;
203 they are printed in turn, each one followed by a newline.
206 @deffn {Scheme Procedure} valid-object-procedure? proc
207 @deffnx {C Function} scm_valid_object_procedure_p (proc)
208 Return @code{#t} iff @var{proc} is a procedure that can be used with @code{set-object-procedure}. It is always valid to use a closure constructed by @code{lambda}.
211 @deffn {Scheme Procedure} %get-pre-modules-obarray
212 @deffnx {C Function} scm_get_pre_modules_obarray ()
213 Return the obarray that is used for all new bindings before the module system is booted. The first call to @code{set-current-module} will boot the module system.
216 @deffn {Scheme Procedure} standard-interface-eval-closure module
217 @deffnx {C Function} scm_standard_interface_eval_closure (module)
218 Return a interface eval closure for the module @var{module}. Such a closure does not allow new bindings to be added.
221 @deffn {Scheme Procedure} env-module env
222 @deffnx {C Function} scm_env_module (env)
223 Return the module of @var{ENV}, a lexical environment.
226 @deffn {Scheme Procedure} single-active-thread?
227 implemented by the C function "scm_single_thread_p"
230 @deffn {Scheme Procedure} set-debug-cell-accesses! flag
231 @deffnx {C Function} scm_set_debug_cell_accesses_x (flag)
232 This function is used to turn on checking for a debug version of GUILE. This version does not support this functionality
236 @deffn {Scheme Procedure} standard-eval-closure module
237 @deffnx {C Function} scm_standard_eval_closure (module)
238 Return an eval closure for the module @var{module}.
241 @deffn {Scheme Procedure} mask-signals
242 @deffnx {C Function} scm_mask_signals ()
243 Mask signals. The returned value is not specified.
246 @deffn {Scheme Procedure} unmask-signals
247 @deffnx {C Function} scm_unmask_signals ()
248 Unmask signals. The returned value is not specified.
251 @deffn {Scheme Procedure} noop . args
252 @deffnx {C Function} scm_noop (args)
253 Do nothing. When called without arguments, return @code{#f},
254 otherwise return the first argument.
257 @deffn {Scheme Procedure} system-async thunk
258 @deffnx {C Function} scm_system_async (thunk)
259 This function is deprecated. You can use @var{thunk} directly
260 instead of explicitly creating an async object.
264 @deffn {Scheme Procedure} object-address obj
265 @deffnx {C Function} scm_object_address (obj)
266 Return an integer that for the lifetime of @var{obj} is uniquely
267 returned by this function for @var{obj}
270 @deffn {Scheme Procedure} environment? obj
271 @deffnx {C Function} scm_environment_p (obj)
272 Return @code{#t} if @var{obj} is an environment, or @code{#f}
276 @deffn {Scheme Procedure} environment-bound? env sym
277 @deffnx {C Function} scm_environment_bound_p (env, sym)
278 Return @code{#t} if @var{sym} is bound in @var{env}, or
282 @deffn {Scheme Procedure} environment-ref env sym
283 @deffnx {C Function} scm_environment_ref (env, sym)
284 Return the value of the location bound to @var{sym} in
285 @var{env}. If @var{sym} is unbound in @var{env}, signal an
286 @code{environment:unbound} error.
289 @deffn {Scheme Procedure} environment-fold env proc init
290 @deffnx {C Function} scm_environment_fold (env, proc, init)
291 Iterate over all the bindings in @var{env}, accumulating some
293 For each binding in @var{env}, apply @var{proc} to the symbol
294 bound, its value, and the result from the previous application
296 Use @var{init} as @var{proc}'s third argument the first time
297 @var{proc} is applied.
298 If @var{env} contains no bindings, this function simply returns
300 If @var{env} binds the symbol sym1 to the value val1, sym2 to
301 val2, and so on, then this procedure computes:
309 Each binding in @var{env} will be processed exactly once.
310 @code{environment-fold} makes no guarantees about the order in
311 which the bindings are processed.
312 Here is a function which, given an environment, constructs an
313 association list representing that environment's bindings,
314 using environment-fold:
316 (define (environment->alist env)
317 (environment-fold env
318 (lambda (sym val tail)
319 (cons (cons sym val) tail))
324 @deffn {Scheme Procedure} environment-define env sym val
325 @deffnx {C Function} scm_environment_define (env, sym, val)
326 Bind @var{sym} to a new location containing @var{val} in
327 @var{env}. If @var{sym} is already bound to another location
328 in @var{env} and the binding is mutable, that binding is
329 replaced. The new binding and location are both mutable. The
330 return value is unspecified.
331 If @var{sym} is already bound in @var{env}, and the binding is
332 immutable, signal an @code{environment:immutable-binding} error.
335 @deffn {Scheme Procedure} environment-undefine env sym
336 @deffnx {C Function} scm_environment_undefine (env, sym)
337 Remove any binding for @var{sym} from @var{env}. If @var{sym}
338 is unbound in @var{env}, do nothing. The return value is
340 If @var{sym} is already bound in @var{env}, and the binding is
341 immutable, signal an @code{environment:immutable-binding} error.
344 @deffn {Scheme Procedure} environment-set! env sym val
345 @deffnx {C Function} scm_environment_set_x (env, sym, val)
346 If @var{env} binds @var{sym} to some location, change that
347 location's value to @var{val}. The return value is
349 If @var{sym} is not bound in @var{env}, signal an
350 @code{environment:unbound} error. If @var{env} binds @var{sym}
351 to an immutable location, signal an
352 @code{environment:immutable-location} error.
355 @deffn {Scheme Procedure} environment-cell env sym for_write
356 @deffnx {C Function} scm_environment_cell (env, sym, for_write)
357 Return the value cell which @var{env} binds to @var{sym}, or
358 @code{#f} if the binding does not live in a value cell.
359 The argument @var{for-write} indicates whether the caller
360 intends to modify the variable's value by mutating the value
361 cell. If the variable is immutable, then
362 @code{environment-cell} signals an
363 @code{environment:immutable-location} error.
364 If @var{sym} is unbound in @var{env}, signal an
365 @code{environment:unbound} error.
366 If you use this function, you should consider using
367 @code{environment-observe}, to be notified when @var{sym} gets
368 re-bound to a new value cell, or becomes undefined.
371 @deffn {Scheme Procedure} environment-observe env proc
372 @deffnx {C Function} scm_environment_observe (env, proc)
373 Whenever @var{env}'s bindings change, apply @var{proc} to
375 This function returns an object, token, which you can pass to
376 @code{environment-unobserve} to remove @var{proc} from the set
377 of procedures observing @var{env}. The type and value of
378 token is unspecified.
381 @deffn {Scheme Procedure} environment-observe-weak env proc
382 @deffnx {C Function} scm_environment_observe_weak (env, proc)
383 This function is the same as environment-observe, except that
384 the reference @var{env} retains to @var{proc} is a weak
385 reference. This means that, if there are no other live,
386 non-weak references to @var{proc}, it will be
387 garbage-collected, and dropped from @var{env}'s
388 list of observing procedures.
391 @deffn {Scheme Procedure} environment-unobserve token
392 @deffnx {C Function} scm_environment_unobserve (token)
393 Cancel the observation request which returned the value
394 @var{token}. The return value is unspecified.
395 If a call @code{(environment-observe env proc)} returns
396 @var{token}, then the call @code{(environment-unobserve token)}
397 will cause @var{proc} to no longer be called when @var{env}'s
401 @deffn {Scheme Procedure} make-leaf-environment
402 @deffnx {C Function} scm_make_leaf_environment ()
403 Create a new leaf environment, containing no bindings.
404 All bindings and locations created in the new environment
408 @deffn {Scheme Procedure} leaf-environment? object
409 @deffnx {C Function} scm_leaf_environment_p (object)
410 Return @code{#t} if object is a leaf environment, or @code{#f}
414 @deffn {Scheme Procedure} make-eval-environment local imported
415 @deffnx {C Function} scm_make_eval_environment (local, imported)
416 Return a new environment object eval whose bindings are the
417 union of the bindings in the environments @var{local} and
418 @var{imported}, with bindings from @var{local} taking
419 precedence. Definitions made in eval are placed in @var{local}.
420 Applying @code{environment-define} or
421 @code{environment-undefine} to eval has the same effect as
422 applying the procedure to @var{local}.
423 Note that eval incorporates @var{local} and @var{imported} by
425 If, after creating eval, the program changes the bindings of
426 @var{local} or @var{imported}, those changes will be visible
428 Since most Scheme evaluation takes place in eval environments,
429 they transparently cache the bindings received from @var{local}
430 and @var{imported}. Thus, the first time the program looks up
431 a symbol in eval, eval may make calls to @var{local} or
432 @var{imported} to find their bindings, but subsequent
433 references to that symbol will be as fast as references to
434 bindings in finite environments.
435 In typical use, @var{local} will be a finite environment, and
436 @var{imported} will be an import environment
439 @deffn {Scheme Procedure} eval-environment? object
440 @deffnx {C Function} scm_eval_environment_p (object)
441 Return @code{#t} if object is an eval environment, or @code{#f}
445 @deffn {Scheme Procedure} eval-environment-local env
446 @deffnx {C Function} scm_eval_environment_local (env)
447 Return the local environment of eval environment @var{env}.
450 @deffn {Scheme Procedure} eval-environment-set-local! env local
451 @deffnx {C Function} scm_eval_environment_set_local_x (env, local)
452 Change @var{env}'s local environment to @var{local}.
455 @deffn {Scheme Procedure} eval-environment-imported env
456 @deffnx {C Function} scm_eval_environment_imported (env)
457 Return the imported environment of eval environment @var{env}.
460 @deffn {Scheme Procedure} eval-environment-set-imported! env imported
461 @deffnx {C Function} scm_eval_environment_set_imported_x (env, imported)
462 Change @var{env}'s imported environment to @var{imported}.
465 @deffn {Scheme Procedure} make-import-environment imports conflict_proc
466 @deffnx {C Function} scm_make_import_environment (imports, conflict_proc)
467 Return a new environment @var{imp} whose bindings are the union
468 of the bindings from the environments in @var{imports};
469 @var{imports} must be a list of environments. That is,
470 @var{imp} binds a symbol to a location when some element of
472 If two different elements of @var{imports} have a binding for
473 the same symbol, the @var{conflict-proc} is called with the
474 following parameters: the import environment, the symbol and
475 the list of the imported environments that bind the symbol.
476 If the @var{conflict-proc} returns an environment @var{env},
477 the conflict is considered as resolved and the binding from
478 @var{env} is used. If the @var{conflict-proc} returns some
479 non-environment object, the conflict is considered unresolved
480 and the symbol is treated as unspecified in the import
482 The checking for conflicts may be performed lazily, i. e. at
483 the moment when a value or binding for a certain symbol is
484 requested instead of the moment when the environment is
485 created or the bindings of the imports change.
486 All bindings in @var{imp} are immutable. If you apply
487 @code{environment-define} or @code{environment-undefine} to
488 @var{imp}, Guile will signal an
489 @code{environment:immutable-binding} error. However,
490 notice that the set of bindings in @var{imp} may still change,
491 if one of its imported environments changes.
494 @deffn {Scheme Procedure} import-environment? object
495 @deffnx {C Function} scm_import_environment_p (object)
496 Return @code{#t} if object is an import environment, or
500 @deffn {Scheme Procedure} import-environment-imports env
501 @deffnx {C Function} scm_import_environment_imports (env)
502 Return the list of environments imported by the import
503 environment @var{env}.
506 @deffn {Scheme Procedure} import-environment-set-imports! env imports
507 @deffnx {C Function} scm_import_environment_set_imports_x (env, imports)
508 Change @var{env}'s list of imported environments to
509 @var{imports}, and check for conflicts.
512 @deffn {Scheme Procedure} make-export-environment private signature
513 @deffnx {C Function} scm_make_export_environment (private, signature)
514 Return a new environment @var{exp} containing only those
515 bindings in private whose symbols are present in
516 @var{signature}. The @var{private} argument must be an
519 The environment @var{exp} binds symbol to location when
520 @var{env} does, and symbol is exported by @var{signature}.
522 @var{signature} is a list specifying which of the bindings in
523 @var{private} should be visible in @var{exp}. Each element of
524 @var{signature} should be a list of the form:
525 (symbol attribute ...)
526 where each attribute is one of the following:
528 @item the symbol @code{mutable-location}
529 @var{exp} should treat the
530 location bound to symbol as mutable. That is, @var{exp}
531 will pass calls to @code{environment-set!} or
532 @code{environment-cell} directly through to private.
533 @item the symbol @code{immutable-location}
534 @var{exp} should treat
535 the location bound to symbol as immutable. If the program
536 applies @code{environment-set!} to @var{exp} and symbol, or
537 calls @code{environment-cell} to obtain a writable value
538 cell, @code{environment-set!} will signal an
539 @code{environment:immutable-location} error. Note that, even
540 if an export environment treats a location as immutable, the
541 underlying environment may treat it as mutable, so its
544 It is an error for an element of signature to specify both
545 @code{mutable-location} and @code{immutable-location}. If
546 neither is specified, @code{immutable-location} is assumed.
548 As a special case, if an element of signature is a lone
549 symbol @var{sym}, it is equivalent to an element of the form
552 All bindings in @var{exp} are immutable. If you apply
553 @code{environment-define} or @code{environment-undefine} to
554 @var{exp}, Guile will signal an
555 @code{environment:immutable-binding} error. However,
556 notice that the set of bindings in @var{exp} may still change,
557 if the bindings in private change.
560 @deffn {Scheme Procedure} export-environment? object
561 @deffnx {C Function} scm_export_environment_p (object)
562 Return @code{#t} if object is an export environment, or
566 @deffn {Scheme Procedure} export-environment-private env
567 @deffnx {C Function} scm_export_environment_private (env)
568 Return the private environment of export environment @var{env}.
571 @deffn {Scheme Procedure} export-environment-set-private! env private
572 @deffnx {C Function} scm_export_environment_set_private_x (env, private)
573 Change the private environment of export environment @var{env}.
576 @deffn {Scheme Procedure} export-environment-signature env
577 @deffnx {C Function} scm_export_environment_signature (env)
578 Return the signature of export environment @var{env}.
581 @deffn {Scheme Procedure} export-environment-set-signature! env signature
582 @deffnx {C Function} scm_export_environment_set_signature_x (env, signature)
583 Change the signature of export environment @var{env}.
586 @deffn {Scheme Procedure} %compute-slots class
587 @deffnx {C Function} scm_sys_compute_slots (class)
588 Return a list consisting of the names of all slots belonging to
589 class @var{class}, i. e. the slots of @var{class} and of all of
593 @deffn {Scheme Procedure} get-keyword key l default_value
594 @deffnx {C Function} scm_get_keyword (key, l, default_value)
595 Determine an associated value for the keyword @var{key} from
596 the list @var{l}. The list @var{l} has to consist of an even
597 number of elements, where, starting with the first, every
598 second element is a keyword, followed by its associated value.
599 If @var{l} does not hold a value for @var{key}, the value
600 @var{default_value} is returned.
603 @deffn {Scheme Procedure} slot-ref-using-class class obj slot_name
604 @deffnx {C Function} scm_slot_ref_using_class (class, obj, slot_name)
608 @deffn {Scheme Procedure} slot-set-using-class! class obj slot_name value
609 @deffnx {C Function} scm_slot_set_using_class_x (class, obj, slot_name, value)
613 @deffn {Scheme Procedure} class-of x
614 @deffnx {C Function} scm_class_of (x)
615 Return the class of @var{x}.
618 @deffn {Scheme Procedure} %goops-loaded
619 @deffnx {C Function} scm_sys_goops_loaded ()
620 Announce that GOOPS is loaded and perform initialization
621 on the C level which depends on the loaded GOOPS modules.
624 @deffn {Scheme Procedure} %method-more-specific? m1 m2 targs
625 @deffnx {C Function} scm_sys_method_more_specific_p (m1, m2, targs)
629 @deffn {Scheme Procedure} find-method . l
630 @deffnx {C Function} scm_find_method (l)
634 @deffn {Scheme Procedure} primitive-generic-generic subr
635 @deffnx {C Function} scm_primitive_generic_generic (subr)
639 @deffn {Scheme Procedure} enable-primitive-generic! . subrs
640 @deffnx {C Function} scm_enable_primitive_generic_x (subrs)
644 @deffn {Scheme Procedure} generic-capability? proc
645 @deffnx {C Function} scm_generic_capability_p (proc)
649 @deffn {Scheme Procedure} %invalidate-method-cache! gf
650 @deffnx {C Function} scm_sys_invalidate_method_cache_x (gf)
654 @deffn {Scheme Procedure} %invalidate-class class
655 @deffnx {C Function} scm_sys_invalidate_class (class)
659 @deffn {Scheme Procedure} %modify-class old new
660 @deffnx {C Function} scm_sys_modify_class (old, new)
664 @deffn {Scheme Procedure} %modify-instance old new
665 @deffnx {C Function} scm_sys_modify_instance (old, new)
669 @deffn {Scheme Procedure} %set-object-setter! obj setter
670 @deffnx {C Function} scm_sys_set_object_setter_x (obj, setter)
674 @deffn {Scheme Procedure} %allocate-instance class initargs
675 @deffnx {C Function} scm_sys_allocate_instance (class, initargs)
676 Create a new instance of class @var{class} and initialize it
677 from the arguments @var{initargs}.
680 @deffn {Scheme Procedure} slot-exists? obj slot_name
681 @deffnx {C Function} scm_slot_exists_p (obj, slot_name)
682 Return @code{#t} if @var{obj} has a slot named @var{slot_name}.
685 @deffn {Scheme Procedure} slot-bound? obj slot_name
686 @deffnx {C Function} scm_slot_bound_p (obj, slot_name)
687 Return @code{#t} if the slot named @var{slot_name} of @var{obj}
691 @deffn {Scheme Procedure} slot-set! obj slot_name value
692 @deffnx {C Function} scm_slot_set_x (obj, slot_name, value)
693 Set the slot named @var{slot_name} of @var{obj} to @var{value}.
696 @deffn {Scheme Procedure} slot-exists-using-class? class obj slot_name
697 @deffnx {C Function} scm_slot_exists_using_class_p (class, obj, slot_name)
701 @deffn {Scheme Procedure} slot-bound-using-class? class obj slot_name
702 @deffnx {C Function} scm_slot_bound_using_class_p (class, obj, slot_name)
706 @deffn {Scheme Procedure} %fast-slot-set! obj index value
707 @deffnx {C Function} scm_sys_fast_slot_set_x (obj, index, value)
708 Set the slot with index @var{index} in @var{obj} to
712 @deffn {Scheme Procedure} %fast-slot-ref obj index
713 @deffnx {C Function} scm_sys_fast_slot_ref (obj, index)
714 Return the slot value with index @var{index} from @var{obj}.
717 @deffn {Scheme Procedure} @@assert-bound-ref obj index
718 @deffnx {C Function} scm_at_assert_bound_ref (obj, index)
719 Like @code{assert-bound}, but use @var{index} for accessing
720 the value from @var{obj}.
723 @deffn {Scheme Procedure} assert-bound value obj
724 @deffnx {C Function} scm_assert_bound (value, obj)
725 Return @var{value} if it is bound, and invoke the
726 @var{slot-unbound} method of @var{obj} if it is not.
729 @deffn {Scheme Procedure} unbound? obj
730 @deffnx {C Function} scm_unbound_p (obj)
731 Return @code{#t} if @var{obj} is unbound.
734 @deffn {Scheme Procedure} make-unbound
735 @deffnx {C Function} scm_make_unbound ()
736 Return the unbound value.
739 @deffn {Scheme Procedure} accessor-method-slot-definition obj
740 @deffnx {C Function} scm_accessor_method_slot_definition (obj)
741 Return the slot definition of the accessor @var{obj}.
744 @deffn {Scheme Procedure} method-procedure obj
745 @deffnx {C Function} scm_method_procedure (obj)
746 Return the procedure of the method @var{obj}.
749 @deffn {Scheme Procedure} method-specializers obj
750 @deffnx {C Function} scm_method_specializers (obj)
751 Return specializers of the method @var{obj}.
754 @deffn {Scheme Procedure} method-generic-function obj
755 @deffnx {C Function} scm_method_generic_function (obj)
756 Return the generic function for the method @var{obj}.
759 @deffn {Scheme Procedure} generic-function-methods obj
760 @deffnx {C Function} scm_generic_function_methods (obj)
761 Return the methods of the generic function @var{obj}.
764 @deffn {Scheme Procedure} generic-function-name obj
765 @deffnx {C Function} scm_generic_function_name (obj)
766 Return the name of the generic function @var{obj}.
769 @deffn {Scheme Procedure} class-environment obj
770 @deffnx {C Function} scm_class_environment (obj)
771 Return the environment of the class @var{obj}.
774 @deffn {Scheme Procedure} class-slots obj
775 @deffnx {C Function} scm_class_slots (obj)
776 Return the slot list of the class @var{obj}.
779 @deffn {Scheme Procedure} class-precedence-list obj
780 @deffnx {C Function} scm_class_precedence_list (obj)
781 Return the class precedence list of the class @var{obj}.
784 @deffn {Scheme Procedure} class-direct-methods obj
785 @deffnx {C Function} scm_class_direct_methods (obj)
786 Return the direct methods of the class @var{obj}
789 @deffn {Scheme Procedure} class-direct-subclasses obj
790 @deffnx {C Function} scm_class_direct_subclasses (obj)
791 Return the direct subclasses of the class @var{obj}.
794 @deffn {Scheme Procedure} class-direct-slots obj
795 @deffnx {C Function} scm_class_direct_slots (obj)
796 Return the direct slots of the class @var{obj}.
799 @deffn {Scheme Procedure} class-direct-supers obj
800 @deffnx {C Function} scm_class_direct_supers (obj)
801 Return the direct superclasses of the class @var{obj}.
804 @deffn {Scheme Procedure} class-name obj
805 @deffnx {C Function} scm_class_name (obj)
806 Return the class name of @var{obj}.
809 @deffn {Scheme Procedure} instance? obj
810 @deffnx {C Function} scm_instance_p (obj)
811 Return @code{#t} if @var{obj} is an instance.
814 @deffn {Scheme Procedure} %inherit-magic! class dsupers
815 @deffnx {C Function} scm_sys_inherit_magic_x (class, dsupers)
819 @deffn {Scheme Procedure} %prep-layout! class
820 @deffnx {C Function} scm_sys_prep_layout_x (class)
824 @deffn {Scheme Procedure} %initialize-object obj initargs
825 @deffnx {C Function} scm_sys_initialize_object (obj, initargs)
826 Initialize the object @var{obj} with the given arguments
830 @deffn {Scheme Procedure} make . args
831 @deffnx {C Function} scm_make (args)
832 Make a new object. @var{args} must contain the class and
833 all necessary initialization information.
836 @deffn {Scheme Procedure} slot-ref obj slot_name
837 @deffnx {C Function} scm_slot_ref (obj, slot_name)
838 Return the value from @var{obj}'s slot with the name
842 @deffn {Scheme Procedure} %tag-body body
843 @deffnx {C Function} scm_sys_tag_body (body)
844 Internal GOOPS magic---don't use this function!
847 @deffn {Scheme Procedure} make-keyword-from-dash-symbol symbol
848 @deffnx {C Function} scm_make_keyword_from_dash_symbol (symbol)
849 Make a keyword object from a @var{symbol} that starts with a dash.
852 @deffn {Scheme Procedure} keyword-dash-symbol keyword
853 @deffnx {C Function} scm_keyword_dash_symbol (keyword)
854 Return the dash symbol for @var{keyword}.
855 This is the inverse of @code{make-keyword-from-dash-symbol}.
858 @deffn {Scheme Procedure} dimensions->uniform-array dims prot [fill]
859 @deffnx {Scheme Procedure} make-uniform-vector length prototype [fill]
860 @deffnx {C Function} scm_dimensions_to_uniform_array (dims, prot, fill)
861 Create and return a uniform array or vector of type
862 corresponding to @var{prototype} with dimensions @var{dims} or
863 length @var{length}. If @var{fill} is supplied, it's used to
864 fill the array, otherwise @var{prototype} is used.
867 @deffn {Scheme Procedure} list->uniform-array ndim prot lst
868 @deffnx {C Function} scm_list_to_uniform_array (ndim, prot, lst)
869 Return a uniform array of the type indicated by prototype
870 @var{prot} with elements the same as those of @var{lst}.
871 Elements must be of the appropriate type, no coercions are
874 The argument @var{ndim} determines the number of dimensions
875 of the array. It is either an exact integer, giving the
876 number directly, or a list of exact integers, whose length
877 specifies the number of dimensions and each element is the
878 lower index bound of its dimension.
881 @deffn {Scheme Procedure} array-prototype ra
882 @deffnx {C Function} scm_array_prototype (ra)
883 Return an object that would produce an array of the same type
884 as @var{array}, if used as the @var{prototype} for
885 @code{make-uniform-array}.
888 @deffn {Scheme Procedure} call-with-dynamic-root thunk handler
889 @deffnx {C Function} scm_call_with_dynamic_root (thunk, handler)
890 Call @var{thunk} with a new dynamic state and withina continuation barrier. The @var{handler} catches allotherwise uncaught throws and executes within the samedynamic context as @var{thunk}.
893 @deffn {Scheme Procedure} dynamic-root
894 @deffnx {C Function} scm_dynamic_root ()
895 Return an object representing the current dynamic root.
897 These objects are only useful for comparison using @code{eq?}.
901 @deffn {Scheme Procedure} uniform-vector? obj
902 @deffnx {C Function} scm_uniform_vector_p (obj)
903 Return @code{#t} if @var{obj} is a uniform vector.
906 @deffn {Scheme Procedure} uniform-vector-ref v idx
907 @deffnx {C Function} scm_uniform_vector_ref (v, idx)
908 Return the element at index @var{idx} of the
909 homogenous numeric vector @var{v}.
912 @deffn {Scheme Procedure} uniform-vector-set! v idx val
913 @deffnx {C Function} scm_uniform_vector_set_x (v, idx, val)
914 Set the element at index @var{idx} of the
915 homogenous numeric vector @var{v} to @var{val}.
918 @deffn {Scheme Procedure} uniform-vector->list uvec
919 @deffnx {C Function} scm_uniform_vector_to_list (uvec)
920 Convert the uniform numeric vector @var{uvec} to a list.
923 @deffn {Scheme Procedure} uniform-vector-length v
924 @deffnx {C Function} scm_uniform_vector_length (v)
925 Return the number of elements in the uniform vector @var{v}.
928 @deffn {Scheme Procedure} make-u8vector len [fill]
929 @deffnx {C Function} scm_make_u8vector (len, fill)
930 Return a newly allocated uniform numeric vector which can
931 hold @var{len} elements. If @var{fill} is given, it is used to
932 initialize the elements, otherwise the contents of the vector
936 @deffn {Scheme Procedure} u8vector . l
937 @deffnx {C Function} scm_u8vector (l)
938 Return a newly allocated uniform numeric vector containing
942 @deffn {Scheme Procedure} list->u8vector l
943 @deffnx {C Function} scm_list_to_u8vector (l)
944 Convert the list @var{l} to a numeric uniform vector.
947 @deffn {Scheme Procedure} any->u8vector obj
948 @deffnx {C Function} scm_any_to_u8vector (obj)
949 Convert @var{obj}, which can be a list, vector, or
950 uniform vector, to a numeric uniform vector of
954 @deffn {Scheme Procedure} string-any-c-code char_pred s [start [end]]
955 @deffnx {C Function} scm_string_any (char_pred, s, start, end)
956 Check if the predicate @var{pred} is true for any character in
959 Calls to @var{pred} are made from left to right across @var{s}.
960 When it returns true (ie.@: non-@code{#f}), that return value
961 is the return from @code{string-any}.
963 The SRFI-13 specification requires that the call to @var{pred}
964 on the last character of @var{s} (assuming that point is
965 reached) be a tail call, but currently in Guile this is not the
969 @deffn {Scheme Procedure} string-every-c-code char_pred s [start [end]]
970 @deffnx {C Function} scm_string_every (char_pred, s, start, end)
971 Check if the predicate @var{pred} is true for every character
972 in the string @var{s}.
974 Calls to @var{pred} are made from left to right across @var{s}.
975 If the predicate is true for every character then the return
976 value from the last @var{pred} call is the return from
979 If there are no characters in @var{s} (ie.@: @var{start} equals
980 @var{end}) then the return is @code{#t}.
982 The SRFI-13 specification requires that the call to @var{pred}
983 on the last character of @var{s} (assuming that point is
984 reached) be a tail call, but currently in Guile this is not the
988 @deffn {Scheme Procedure} inf? x
989 @deffnx {C Function} scm_inf_p (x)
990 Return @code{#t} if @var{x} is either @samp{+inf.0}
991 or @samp{-inf.0}, @code{#f} otherwise.