Merge branch 'master' into wip-manual-2
[bpt/guile.git] / doc / ref / api-undocumented.texi
CommitLineData
12eec8a8
MV
1This file gathers entries that have been automatically generated from
2docstrings in libguile. They are not included in the manual, however,
8fc71812
MV
3for various reasons, mostly because they have been deprecated. They
4are here in this file to give docstring.el a chance to update them
5automatically.
12eec8a8
MV
6
7- The 'environments' are only in Guile by accident and are not used at
8 all and we don't want to advertise them.
9
10- GOOPS is documented in its own manual.
11
8fc71812
MV
12
13
14@deffn {Scheme Procedure} substring-move-right!
15implemented by the C function "scm_substring_move_x"
16@end deffn
17
18@deffn {Scheme Procedure} substring-move-left!
19implemented by the C function "scm_substring_move_x"
20@end deffn
21
22@deffn {Scheme Procedure} gentemp [prefix [obarray]]
23@deffnx {C Function} scm_gentemp (prefix, obarray)
24Create a new symbol with a name unique in an obarray.
25The name is constructed from an optional string @var{prefix}
26and a counter value. The default prefix is @code{t}. The
27@var{obarray} is specified as a second optional argument.
28Default is the system obarray where all normal symbols are
29interned. The counter is increased by 1 at each
30call. There is no provision for resetting the counter.
31@end deffn
32
33@deffn {Scheme Procedure} symbol-set! o s v
34@deffnx {C Function} scm_symbol_set_x (o, s, v)
35Find the symbol in @var{obarray} whose name is @var{string}, and rebind
36it to @var{value}. An error is signalled if @var{string} is not present
37in @var{obarray}.
38@end deffn
39
40@deffn {Scheme Procedure} symbol-bound? o s
41@deffnx {C Function} scm_symbol_bound_p (o, s)
42Return @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
45usually causes it to be interned; @code{symbol-bound?}
46determines whether a symbol has been given any meaningful
47value.
48@end deffn
49
50@deffn {Scheme Procedure} symbol-binding o s
51@deffnx {C Function} scm_symbol_binding (o, s)
52Look up in @var{obarray} the symbol whose name is @var{string}, and
53return the value to which it is bound. If @var{obarray} is @code{#f},
54use the global symbol table. If @var{string} is not interned in
55@var{obarray}, an error is signalled.
56@end deffn
57
58@deffn {Scheme Procedure} unintern-symbol o s
59@deffnx {C Function} scm_unintern_symbol (o, s)
60Remove the symbol with name @var{string} from @var{obarray}. This
61function returns @code{#t} if the symbol was present and @code{#f}
62otherwise.
63@end deffn
64
65@deffn {Scheme Procedure} intern-symbol o s
66@deffnx {C Function} scm_intern_symbol (o, s)
67Add a new symbol to @var{obarray} with name @var{string}, bound to an
68unspecified initial value. The symbol table is not modified if a symbol
69with this name is already present.
70@end deffn
71
72@deffn {Scheme Procedure} string->obarray-symbol o s [softp]
73@deffnx {C Function} scm_string_to_obarray_symbol (o, s, softp)
74Intern a new symbol in @var{obarray}, a symbol table, with name
75@var{string}.
76
77If @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
79symbol table; merely return the pair (@var{symbol}
80. @var{#<undefined>}).
81
82The @var{soft?} argument determines whether new symbol table entries
83should 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
85new entries should not be added for symbols not already present in the
86table; instead, simply return @code{#f}.
87@end deffn
88
89@deffn {Scheme Procedure} read-and-eval! [port]
90@deffnx {C Function} scm_read_and_eval_x (port)
91Read 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
93is left to be read from @var{port}, an @code{end-of-file} error is
94signalled.
95@end deffn
96
97@deffn {Scheme Procedure} sloppy-member x lst
98@deffnx {C Function} scm_sloppy_member (x, lst)
99This procedure behaves like @code{member}, but does no type or error checking.
100Its use is recommended only in writing Guile internals,
101not for high-level Scheme programs.
102@end deffn
103
104@deffn {Scheme Procedure} sloppy-memv x lst
105@deffnx {C Function} scm_sloppy_memv (x, lst)
106This procedure behaves like @code{memv}, but does no type or error checking.
107Its use is recommended only in writing Guile internals,
108not for high-level Scheme programs.
109@end deffn
110
111@deffn {Scheme Procedure} sloppy-memq x lst
112@deffnx {C Function} scm_sloppy_memq (x, lst)
113This procedure behaves like @code{memq}, but does no type or error checking.
114Its use is recommended only in writing Guile internals,
115not for high-level Scheme programs.
116@end deffn
117
118@deffn {Scheme Procedure} builtin-variable name
119@deffnx {C Function} scm_builtin_variable (name)
120Do not use this function.
121@end deffn
122
123@deffn {Scheme Procedure} variable-set-name-hint! var hint
124@deffnx {C Function} scm_variable_set_name_hint (var, hint)
125Do not use this function.
126@end deffn
127
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
131except for those supplied as arguments. This procedure
132was intended to be used before an exec call to close file descriptors
133which are not needed in the new process. However it has the
134undesirable side effect of flushing buffers, so it's deprecated.
135Use port-for-each instead.
136@end deffn
137
138@deffn {Scheme Procedure} c-clear-registered-modules
139@deffnx {C Function} scm_clear_registered_modules ()
140Destroy the list of modules registered with the current Guile process.
141The return value is unspecified. @strong{Warning:} this function does
142not actually unlink or deallocate these modules, but only destroys the
143records of which modules have been loaded. It should therefore be used
144only by module bookkeeping operations.
145@end deffn
146
147@deffn {Scheme Procedure} c-registered-modules
148@deffnx {C Function} scm_registered_modules ()
149Return a list of the object code modules that have been imported into
150the current Guile process. Each element of the list is a pair whose
151car is the name of the module, and whose cdr is the function handle
152for that module's initializer function. The name is the string that
153has been passed to scm_register_module_xxx.
154@end deffn
155
12eec8a8
MV
156@deffn {Scheme Procedure} module-import-interface module sym
157@deffnx {C Function} scm_module_import_interface (module, sym)
3323ec06 158Return the module or interface from which @var{sym} is imported in @var{module}. If @var{sym} is not imported (i.e., it is not defined in @var{module} or it is a module-local binding instead of an imported one), then @code{#f} is returned.
12eec8a8
MV
159@end deffn
160
161
162@deffn {Scheme Procedure} self-evaluating? obj
163@deffnx {C Function} scm_self_evaluating_p (obj)
164Return #t for objects which Guile considers self-evaluating
165@end deffn
166
167@deffn {Scheme Procedure} unmemoize-expr m
168@deffnx {C Function} scm_i_unmemoize_expr (m)
169Unmemoize the memoized expression @var{m},
170@end deffn
171
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)
176Return @code{#t} if @var{obj} is the specified weak hash
177table. Note that a doubly weak hash table is neither a weak key
178nor a weak value hash table.
179@end deffn
180
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)
185Return a weak hash table with @var{size} buckets. As with any
186hash table, choosing a good size for the table requires some
187caution.
188
189You can modify weak hash tables in exactly the same way you
190would modify regular hash tables. (@pxref{Hash Tables})
191@end deffn
192
193@deffn {Scheme Procedure} include-deprecated-features
194Return @code{#t} iff deprecated features should be included
195in public interfaces.
196@end deffn
197
198@deffn {Scheme Procedure} issue-deprecation-warning . msgs
199Output @var{msgs} to @code{(current-error-port)} when this
200is the first call to @code{issue-deprecation-warning} with
201this specific @var{msg}. Do nothing otherwise.
202The argument @var{msgs} should be a list of strings;
203they are printed in turn, each one followed by a newline.
204@end deffn
205
206@deffn {Scheme Procedure} valid-object-procedure? proc
207@deffnx {C Function} scm_valid_object_procedure_p (proc)
208Return @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}.
209@end deffn
210
211@deffn {Scheme Procedure} %get-pre-modules-obarray
212@deffnx {C Function} scm_get_pre_modules_obarray ()
213Return 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.
214@end deffn
215
216@deffn {Scheme Procedure} standard-interface-eval-closure module
217@deffnx {C Function} scm_standard_interface_eval_closure (module)
218Return a interface eval closure for the module @var{module}. Such a closure does not allow new bindings to be added.
219@end deffn
220
221@deffn {Scheme Procedure} env-module env
222@deffnx {C Function} scm_env_module (env)
223Return the module of @var{ENV}, a lexical environment.
224@end deffn
225
226@deffn {Scheme Procedure} single-active-thread?
227implemented by the C function "scm_single_thread_p"
228@end deffn
229
230@deffn {Scheme Procedure} set-debug-cell-accesses! flag
231@deffnx {C Function} scm_set_debug_cell_accesses_x (flag)
232This function is used to turn on checking for a debug version of GUILE. This version does not support this functionality
233
234@end deffn
235
236@deffn {Scheme Procedure} standard-eval-closure module
237@deffnx {C Function} scm_standard_eval_closure (module)
238Return an eval closure for the module @var{module}.
239@end deffn
240
241@deffn {Scheme Procedure} mask-signals
242@deffnx {C Function} scm_mask_signals ()
243Mask signals. The returned value is not specified.
244@end deffn
245
246@deffn {Scheme Procedure} unmask-signals
247@deffnx {C Function} scm_unmask_signals ()
248Unmask signals. The returned value is not specified.
249@end deffn
250
251@deffn {Scheme Procedure} noop . args
252@deffnx {C Function} scm_noop (args)
253Do nothing. When called without arguments, return @code{#f},
254otherwise return the first argument.
255@end deffn
256
257@deffn {Scheme Procedure} system-async thunk
258@deffnx {C Function} scm_system_async (thunk)
259This function is deprecated. You can use @var{thunk} directly
877f06c3 260instead of explicitly creating an async object.
12eec8a8
MV
261
262@end deffn
263
264@deffn {Scheme Procedure} object-address obj
265@deffnx {C Function} scm_object_address (obj)
266Return an integer that for the lifetime of @var{obj} is uniquely
267returned by this function for @var{obj}
268@end deffn
269
270@deffn {Scheme Procedure} environment? obj
271@deffnx {C Function} scm_environment_p (obj)
272Return @code{#t} if @var{obj} is an environment, or @code{#f}
273otherwise.
274@end deffn
275
276@deffn {Scheme Procedure} environment-bound? env sym
277@deffnx {C Function} scm_environment_bound_p (env, sym)
278Return @code{#t} if @var{sym} is bound in @var{env}, or
279@code{#f} otherwise.
280@end deffn
281
282@deffn {Scheme Procedure} environment-ref env sym
283@deffnx {C Function} scm_environment_ref (env, sym)
284Return 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.
287@end deffn
288
289@deffn {Scheme Procedure} environment-fold env proc init
290@deffnx {C Function} scm_environment_fold (env, proc, init)
291Iterate over all the bindings in @var{env}, accumulating some
292value.
293For each binding in @var{env}, apply @var{proc} to the symbol
294bound, its value, and the result from the previous application
295of @var{proc}.
296Use @var{init} as @var{proc}'s third argument the first time
297@var{proc} is applied.
298If @var{env} contains no bindings, this function simply returns
299@var{init}.
300If @var{env} binds the symbol sym1 to the value val1, sym2 to
301val2, and so on, then this procedure computes:
302@lisp
303 (proc sym1 val1
304 (proc sym2 val2
305 ...
306 (proc symn valn
307 init)))
308@end lisp
309Each binding in @var{env} will be processed exactly once.
310@code{environment-fold} makes no guarantees about the order in
311which the bindings are processed.
312Here is a function which, given an environment, constructs an
313association list representing that environment's bindings,
314using environment-fold:
315@lisp
316 (define (environment->alist env)
317 (environment-fold env
318 (lambda (sym val tail)
319 (cons (cons sym val) tail))
320 '()))
321@end lisp
322@end deffn
323
324@deffn {Scheme Procedure} environment-define env sym val
325@deffnx {C Function} scm_environment_define (env, sym, val)
326Bind @var{sym} to a new location containing @var{val} in
327@var{env}. If @var{sym} is already bound to another location
328in @var{env} and the binding is mutable, that binding is
329replaced. The new binding and location are both mutable. The
330return value is unspecified.
331If @var{sym} is already bound in @var{env}, and the binding is
332immutable, signal an @code{environment:immutable-binding} error.
333@end deffn
334
335@deffn {Scheme Procedure} environment-undefine env sym
336@deffnx {C Function} scm_environment_undefine (env, sym)
337Remove any binding for @var{sym} from @var{env}. If @var{sym}
338is unbound in @var{env}, do nothing. The return value is
339unspecified.
340If @var{sym} is already bound in @var{env}, and the binding is
341immutable, signal an @code{environment:immutable-binding} error.
342@end deffn
343
344@deffn {Scheme Procedure} environment-set! env sym val
345@deffnx {C Function} scm_environment_set_x (env, sym, val)
346If @var{env} binds @var{sym} to some location, change that
347location's value to @var{val}. The return value is
348unspecified.
349If @var{sym} is not bound in @var{env}, signal an
350@code{environment:unbound} error. If @var{env} binds @var{sym}
351to an immutable location, signal an
352@code{environment:immutable-location} error.
353@end deffn
354
355@deffn {Scheme Procedure} environment-cell env sym for_write
356@deffnx {C Function} scm_environment_cell (env, sym, for_write)
357Return the value cell which @var{env} binds to @var{sym}, or
358@code{#f} if the binding does not live in a value cell.
359The argument @var{for-write} indicates whether the caller
360intends to modify the variable's value by mutating the value
361cell. If the variable is immutable, then
362@code{environment-cell} signals an
363@code{environment:immutable-location} error.
364If @var{sym} is unbound in @var{env}, signal an
365@code{environment:unbound} error.
366If you use this function, you should consider using
367@code{environment-observe}, to be notified when @var{sym} gets
368re-bound to a new value cell, or becomes undefined.
369@end deffn
370
371@deffn {Scheme Procedure} environment-observe env proc
372@deffnx {C Function} scm_environment_observe (env, proc)
373Whenever @var{env}'s bindings change, apply @var{proc} to
374@var{env}.
375This function returns an object, token, which you can pass to
376@code{environment-unobserve} to remove @var{proc} from the set
377of procedures observing @var{env}. The type and value of
378token is unspecified.
379@end deffn
380
381@deffn {Scheme Procedure} environment-observe-weak env proc
382@deffnx {C Function} scm_environment_observe_weak (env, proc)
383This function is the same as environment-observe, except that
384the reference @var{env} retains to @var{proc} is a weak
385reference. This means that, if there are no other live,
386non-weak references to @var{proc}, it will be
387garbage-collected, and dropped from @var{env}'s
388list of observing procedures.
389@end deffn
390
391@deffn {Scheme Procedure} environment-unobserve token
392@deffnx {C Function} scm_environment_unobserve (token)
393Cancel the observation request which returned the value
394@var{token}. The return value is unspecified.
395If a call @code{(environment-observe env proc)} returns
396@var{token}, then the call @code{(environment-unobserve token)}
397will cause @var{proc} to no longer be called when @var{env}'s
398bindings change.
399@end deffn
400
401@deffn {Scheme Procedure} make-leaf-environment
402@deffnx {C Function} scm_make_leaf_environment ()
403Create a new leaf environment, containing no bindings.
404All bindings and locations created in the new environment
405will be mutable.
406@end deffn
407
408@deffn {Scheme Procedure} leaf-environment? object
409@deffnx {C Function} scm_leaf_environment_p (object)
410Return @code{#t} if object is a leaf environment, or @code{#f}
411otherwise.
412@end deffn
413
414@deffn {Scheme Procedure} make-eval-environment local imported
415@deffnx {C Function} scm_make_eval_environment (local, imported)
416Return a new environment object eval whose bindings are the
417union of the bindings in the environments @var{local} and
418@var{imported}, with bindings from @var{local} taking
419precedence. Definitions made in eval are placed in @var{local}.
420Applying @code{environment-define} or
421@code{environment-undefine} to eval has the same effect as
422applying the procedure to @var{local}.
423Note that eval incorporates @var{local} and @var{imported} by
424reference:
425If, after creating eval, the program changes the bindings of
426@var{local} or @var{imported}, those changes will be visible
427in eval.
428Since most Scheme evaluation takes place in eval environments,
429they transparently cache the bindings received from @var{local}
430and @var{imported}. Thus, the first time the program looks up
431a symbol in eval, eval may make calls to @var{local} or
432@var{imported} to find their bindings, but subsequent
433references to that symbol will be as fast as references to
434bindings in finite environments.
435In typical use, @var{local} will be a finite environment, and
436@var{imported} will be an import environment
437@end deffn
438
439@deffn {Scheme Procedure} eval-environment? object
440@deffnx {C Function} scm_eval_environment_p (object)
441Return @code{#t} if object is an eval environment, or @code{#f}
442otherwise.
443@end deffn
444
445@deffn {Scheme Procedure} eval-environment-local env
446@deffnx {C Function} scm_eval_environment_local (env)
447Return the local environment of eval environment @var{env}.
448@end deffn
449
450@deffn {Scheme Procedure} eval-environment-set-local! env local
451@deffnx {C Function} scm_eval_environment_set_local_x (env, local)
452Change @var{env}'s local environment to @var{local}.
453@end deffn
454
455@deffn {Scheme Procedure} eval-environment-imported env
456@deffnx {C Function} scm_eval_environment_imported (env)
457Return the imported environment of eval environment @var{env}.
458@end deffn
459
460@deffn {Scheme Procedure} eval-environment-set-imported! env imported
461@deffnx {C Function} scm_eval_environment_set_imported_x (env, imported)
462Change @var{env}'s imported environment to @var{imported}.
463@end deffn
464
465@deffn {Scheme Procedure} make-import-environment imports conflict_proc
466@deffnx {C Function} scm_make_import_environment (imports, conflict_proc)
467Return a new environment @var{imp} whose bindings are the union
468of 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
471@var{imports} does.
472If two different elements of @var{imports} have a binding for
473the same symbol, the @var{conflict-proc} is called with the
474following parameters: the import environment, the symbol and
475the list of the imported environments that bind the symbol.
476If the @var{conflict-proc} returns an environment @var{env},
477the conflict is considered as resolved and the binding from
478@var{env} is used. If the @var{conflict-proc} returns some
479non-environment object, the conflict is considered unresolved
480and the symbol is treated as unspecified in the import
481environment.
482The checking for conflicts may be performed lazily, i. e. at
483the moment when a value or binding for a certain symbol is
484requested instead of the moment when the environment is
485created or the bindings of the imports change.
486All 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,
490notice that the set of bindings in @var{imp} may still change,
491if one of its imported environments changes.
492@end deffn
493
494@deffn {Scheme Procedure} import-environment? object
495@deffnx {C Function} scm_import_environment_p (object)
496Return @code{#t} if object is an import environment, or
497@code{#f} otherwise.
498@end deffn
499
500@deffn {Scheme Procedure} import-environment-imports env
501@deffnx {C Function} scm_import_environment_imports (env)
502Return the list of environments imported by the import
503environment @var{env}.
504@end deffn
505
506@deffn {Scheme Procedure} import-environment-set-imports! env imports
507@deffnx {C Function} scm_import_environment_set_imports_x (env, imports)
508Change @var{env}'s list of imported environments to
509@var{imports}, and check for conflicts.
510@end deffn
511
512@deffn {Scheme Procedure} make-export-environment private signature
513@deffnx {C Function} scm_make_export_environment (private, signature)
514Return a new environment @var{exp} containing only those
515bindings in private whose symbols are present in
516@var{signature}. The @var{private} argument must be an
517environment.
518
519The environment @var{exp} binds symbol to location when
520@var{env} does, and symbol is exported by @var{signature}.
521
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 ...)
526where each attribute is one of the following:
527@table @asis
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
542 value may change.
543@end table
544It is an error for an element of signature to specify both
545@code{mutable-location} and @code{immutable-location}. If
546neither is specified, @code{immutable-location} is assumed.
547
548As a special case, if an element of signature is a lone
549symbol @var{sym}, it is equivalent to an element of the form
550@code{(sym)}.
551
552All 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,
556notice that the set of bindings in @var{exp} may still change,
557if the bindings in private change.
558@end deffn
559
560@deffn {Scheme Procedure} export-environment? object
561@deffnx {C Function} scm_export_environment_p (object)
562Return @code{#t} if object is an export environment, or
563@code{#f} otherwise.
564@end deffn
565
566@deffn {Scheme Procedure} export-environment-private env
567@deffnx {C Function} scm_export_environment_private (env)
568Return the private environment of export environment @var{env}.
569@end deffn
570
571@deffn {Scheme Procedure} export-environment-set-private! env private
572@deffnx {C Function} scm_export_environment_set_private_x (env, private)
573Change the private environment of export environment @var{env}.
574@end deffn
575
576@deffn {Scheme Procedure} export-environment-signature env
577@deffnx {C Function} scm_export_environment_signature (env)
578Return the signature of export environment @var{env}.
579@end deffn
580
581@deffn {Scheme Procedure} export-environment-set-signature! env signature
582@deffnx {C Function} scm_export_environment_set_signature_x (env, signature)
583Change the signature of export environment @var{env}.
584@end deffn
585
586@deffn {Scheme Procedure} %compute-slots class
587@deffnx {C Function} scm_sys_compute_slots (class)
588Return a list consisting of the names of all slots belonging to
589class @var{class}, i. e. the slots of @var{class} and of all of
590its superclasses.
591@end deffn
592
593@deffn {Scheme Procedure} get-keyword key l default_value
594@deffnx {C Function} scm_get_keyword (key, l, default_value)
595Determine an associated value for the keyword @var{key} from
596the list @var{l}. The list @var{l} has to consist of an even
597number of elements, where, starting with the first, every
598second element is a keyword, followed by its associated value.
599If @var{l} does not hold a value for @var{key}, the value
600@var{default_value} is returned.
601@end deffn
602
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)
605
606@end deffn
607
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)
610
611@end deffn
612
613@deffn {Scheme Procedure} class-of x
614@deffnx {C Function} scm_class_of (x)
615Return the class of @var{x}.
616@end deffn
617
618@deffn {Scheme Procedure} %goops-loaded
619@deffnx {C Function} scm_sys_goops_loaded ()
620Announce that GOOPS is loaded and perform initialization
621on the C level which depends on the loaded GOOPS modules.
622@end deffn
623
624@deffn {Scheme Procedure} %method-more-specific? m1 m2 targs
625@deffnx {C Function} scm_sys_method_more_specific_p (m1, m2, targs)
3323ec06 626Return true if method @var{m1} is more specific than @var{m2} given the argument types (classes) listed in @var{targs}.
12eec8a8
MV
627@end deffn
628
629@deffn {Scheme Procedure} find-method . l
630@deffnx {C Function} scm_find_method (l)
631
632@end deffn
633
634@deffn {Scheme Procedure} primitive-generic-generic subr
635@deffnx {C Function} scm_primitive_generic_generic (subr)
636
637@end deffn
638
639@deffn {Scheme Procedure} enable-primitive-generic! . subrs
640@deffnx {C Function} scm_enable_primitive_generic_x (subrs)
641
642@end deffn
643
644@deffn {Scheme Procedure} generic-capability? proc
645@deffnx {C Function} scm_generic_capability_p (proc)
646
647@end deffn
648
649@deffn {Scheme Procedure} %invalidate-method-cache! gf
650@deffnx {C Function} scm_sys_invalidate_method_cache_x (gf)
651
652@end deffn
653
654@deffn {Scheme Procedure} %invalidate-class class
655@deffnx {C Function} scm_sys_invalidate_class (class)
656
657@end deffn
658
659@deffn {Scheme Procedure} %modify-class old new
660@deffnx {C Function} scm_sys_modify_class (old, new)
661
662@end deffn
663
664@deffn {Scheme Procedure} %modify-instance old new
665@deffnx {C Function} scm_sys_modify_instance (old, new)
666
667@end deffn
668
669@deffn {Scheme Procedure} %set-object-setter! obj setter
670@deffnx {C Function} scm_sys_set_object_setter_x (obj, setter)
671
672@end deffn
673
674@deffn {Scheme Procedure} %allocate-instance class initargs
675@deffnx {C Function} scm_sys_allocate_instance (class, initargs)
676Create a new instance of class @var{class} and initialize it
677from the arguments @var{initargs}.
678@end deffn
679
680@deffn {Scheme Procedure} slot-exists? obj slot_name
681@deffnx {C Function} scm_slot_exists_p (obj, slot_name)
682Return @code{#t} if @var{obj} has a slot named @var{slot_name}.
683@end deffn
684
685@deffn {Scheme Procedure} slot-bound? obj slot_name
686@deffnx {C Function} scm_slot_bound_p (obj, slot_name)
687Return @code{#t} if the slot named @var{slot_name} of @var{obj}
688is bound.
689@end deffn
690
691@deffn {Scheme Procedure} slot-set! obj slot_name value
692@deffnx {C Function} scm_slot_set_x (obj, slot_name, value)
693Set the slot named @var{slot_name} of @var{obj} to @var{value}.
694@end deffn
695
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)
698
699@end deffn
700
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)
703
704@end deffn
705
706@deffn {Scheme Procedure} %fast-slot-set! obj index value
707@deffnx {C Function} scm_sys_fast_slot_set_x (obj, index, value)
708Set the slot with index @var{index} in @var{obj} to
709@var{value}.
710@end deffn
711
712@deffn {Scheme Procedure} %fast-slot-ref obj index
713@deffnx {C Function} scm_sys_fast_slot_ref (obj, index)
714Return the slot value with index @var{index} from @var{obj}.
715@end deffn
716
717@deffn {Scheme Procedure} @@assert-bound-ref obj index
718@deffnx {C Function} scm_at_assert_bound_ref (obj, index)
719Like @code{assert-bound}, but use @var{index} for accessing
720the value from @var{obj}.
721@end deffn
722
723@deffn {Scheme Procedure} assert-bound value obj
724@deffnx {C Function} scm_assert_bound (value, obj)
725Return @var{value} if it is bound, and invoke the
726@var{slot-unbound} method of @var{obj} if it is not.
727@end deffn
728
729@deffn {Scheme Procedure} unbound? obj
730@deffnx {C Function} scm_unbound_p (obj)
731Return @code{#t} if @var{obj} is unbound.
732@end deffn
733
734@deffn {Scheme Procedure} make-unbound
735@deffnx {C Function} scm_make_unbound ()
736Return the unbound value.
737@end deffn
738
739@deffn {Scheme Procedure} accessor-method-slot-definition obj
740@deffnx {C Function} scm_accessor_method_slot_definition (obj)
741Return the slot definition of the accessor @var{obj}.
742@end deffn
743
744@deffn {Scheme Procedure} method-procedure obj
745@deffnx {C Function} scm_method_procedure (obj)
746Return the procedure of the method @var{obj}.
747@end deffn
748
749@deffn {Scheme Procedure} method-specializers obj
750@deffnx {C Function} scm_method_specializers (obj)
751Return specializers of the method @var{obj}.
752@end deffn
753
754@deffn {Scheme Procedure} method-generic-function obj
755@deffnx {C Function} scm_method_generic_function (obj)
756Return the generic function for the method @var{obj}.
757@end deffn
758
759@deffn {Scheme Procedure} generic-function-methods obj
760@deffnx {C Function} scm_generic_function_methods (obj)
761Return the methods of the generic function @var{obj}.
762@end deffn
763
764@deffn {Scheme Procedure} generic-function-name obj
765@deffnx {C Function} scm_generic_function_name (obj)
766Return the name of the generic function @var{obj}.
767@end deffn
768
769@deffn {Scheme Procedure} class-environment obj
770@deffnx {C Function} scm_class_environment (obj)
771Return the environment of the class @var{obj}.
772@end deffn
773
774@deffn {Scheme Procedure} class-slots obj
775@deffnx {C Function} scm_class_slots (obj)
776Return the slot list of the class @var{obj}.
777@end deffn
778
779@deffn {Scheme Procedure} class-precedence-list obj
780@deffnx {C Function} scm_class_precedence_list (obj)
781Return the class precedence list of the class @var{obj}.
782@end deffn
783
784@deffn {Scheme Procedure} class-direct-methods obj
785@deffnx {C Function} scm_class_direct_methods (obj)
786Return the direct methods of the class @var{obj}
787@end deffn
788
789@deffn {Scheme Procedure} class-direct-subclasses obj
790@deffnx {C Function} scm_class_direct_subclasses (obj)
791Return the direct subclasses of the class @var{obj}.
792@end deffn
793
794@deffn {Scheme Procedure} class-direct-slots obj
795@deffnx {C Function} scm_class_direct_slots (obj)
796Return the direct slots of the class @var{obj}.
797@end deffn
798
799@deffn {Scheme Procedure} class-direct-supers obj
800@deffnx {C Function} scm_class_direct_supers (obj)
801Return the direct superclasses of the class @var{obj}.
802@end deffn
803
804@deffn {Scheme Procedure} class-name obj
805@deffnx {C Function} scm_class_name (obj)
806Return the class name of @var{obj}.
807@end deffn
808
809@deffn {Scheme Procedure} instance? obj
810@deffnx {C Function} scm_instance_p (obj)
811Return @code{#t} if @var{obj} is an instance.
812@end deffn
813
814@deffn {Scheme Procedure} %inherit-magic! class dsupers
815@deffnx {C Function} scm_sys_inherit_magic_x (class, dsupers)
816
817@end deffn
818
819@deffn {Scheme Procedure} %prep-layout! class
820@deffnx {C Function} scm_sys_prep_layout_x (class)
821
822@end deffn
823
824@deffn {Scheme Procedure} %initialize-object obj initargs
825@deffnx {C Function} scm_sys_initialize_object (obj, initargs)
826Initialize the object @var{obj} with the given arguments
827@var{initargs}.
828@end deffn
829
830@deffn {Scheme Procedure} make . args
831@deffnx {C Function} scm_make (args)
832Make a new object. @var{args} must contain the class and
833all necessary initialization information.
834@end deffn
835
836@deffn {Scheme Procedure} slot-ref obj slot_name
837@deffnx {C Function} scm_slot_ref (obj, slot_name)
838Return the value from @var{obj}'s slot with the name
839@var{slot_name}.
840@end deffn
841
842@deffn {Scheme Procedure} %tag-body body
843@deffnx {C Function} scm_sys_tag_body (body)
844Internal GOOPS magic---don't use this function!
845@end deffn
7719ef22
MV
846
847@deffn {Scheme Procedure} make-keyword-from-dash-symbol symbol
848@deffnx {C Function} scm_make_keyword_from_dash_symbol (symbol)
849Make a keyword object from a @var{symbol} that starts with a dash.
850@end deffn
851
852@deffn {Scheme Procedure} keyword-dash-symbol keyword
853@deffnx {C Function} scm_keyword_dash_symbol (keyword)
854Return the dash symbol for @var{keyword}.
855This is the inverse of @code{make-keyword-from-dash-symbol}.
856@end deffn
857
673ba2da
MV
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)
861Create and return a uniform array or vector of type
862corresponding to @var{prototype} with dimensions @var{dims} or
863length @var{length}. If @var{fill} is supplied, it's used to
864fill the array, otherwise @var{prototype} is used.
865@end deffn
866
867@deffn {Scheme Procedure} list->uniform-array ndim prot lst
868@deffnx {C Function} scm_list_to_uniform_array (ndim, prot, lst)
869Return a uniform array of the type indicated by prototype
870@var{prot} with elements the same as those of @var{lst}.
871Elements must be of the appropriate type, no coercions are
872done.
873
874The argument @var{ndim} determines the number of dimensions
875of the array. It is either an exact integer, giving the
876number directly, or a list of exact integers, whose length
877specifies the number of dimensions and each element is the
878lower index bound of its dimension.
879@end deffn
880
881@deffn {Scheme Procedure} array-prototype ra
882@deffnx {C Function} scm_array_prototype (ra)
883Return an object that would produce an array of the same type
884as @var{array}, if used as the @var{prototype} for
885@code{make-uniform-array}.
886@end deffn
887
888@deffn {Scheme Procedure} call-with-dynamic-root thunk handler
889@deffnx {C Function} scm_call_with_dynamic_root (thunk, handler)
890Call @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}.
891@end deffn
892
893@deffn {Scheme Procedure} dynamic-root
894@deffnx {C Function} scm_dynamic_root ()
895Return an object representing the current dynamic root.
896
897These objects are only useful for comparison using @code{eq?}.
898
899@end deffn
900
901@deffn {Scheme Procedure} uniform-vector? obj
902@deffnx {C Function} scm_uniform_vector_p (obj)
903Return @code{#t} if @var{obj} is a uniform vector.
904@end deffn
905
906@deffn {Scheme Procedure} uniform-vector-ref v idx
907@deffnx {C Function} scm_uniform_vector_ref (v, idx)
908Return the element at index @var{idx} of the
909homogenous numeric vector @var{v}.
910@end deffn
911
912@deffn {Scheme Procedure} uniform-vector-set! v idx val
913@deffnx {C Function} scm_uniform_vector_set_x (v, idx, val)
914Set the element at index @var{idx} of the
915homogenous numeric vector @var{v} to @var{val}.
916@end deffn
917
918@deffn {Scheme Procedure} uniform-vector->list uvec
919@deffnx {C Function} scm_uniform_vector_to_list (uvec)
920Convert the uniform numeric vector @var{uvec} to a list.
921@end deffn
922
923@deffn {Scheme Procedure} uniform-vector-length v
924@deffnx {C Function} scm_uniform_vector_length (v)
925Return the number of elements in the uniform vector @var{v}.
926@end deffn
927
928@deffn {Scheme Procedure} make-u8vector len [fill]
929@deffnx {C Function} scm_make_u8vector (len, fill)
930Return a newly allocated uniform numeric vector which can
931hold @var{len} elements. If @var{fill} is given, it is used to
932initialize the elements, otherwise the contents of the vector
933is unspecified.
934@end deffn
935
936@deffn {Scheme Procedure} u8vector . l
937@deffnx {C Function} scm_u8vector (l)
938Return a newly allocated uniform numeric vector containing
939all argument values.
940@end deffn
941
942@deffn {Scheme Procedure} list->u8vector l
943@deffnx {C Function} scm_list_to_u8vector (l)
944Convert the list @var{l} to a numeric uniform vector.
945@end deffn
946
947@deffn {Scheme Procedure} any->u8vector obj
948@deffnx {C Function} scm_any_to_u8vector (obj)
949Convert @var{obj}, which can be a list, vector, or
950uniform vector, to a numeric uniform vector of
951type u8.
952@end deffn
953
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)
956Check if the predicate @var{pred} is true for any character in
957the string @var{s}.
958
959Calls to @var{pred} are made from left to right across @var{s}.
960When it returns true (ie.@: non-@code{#f}), that return value
961is the return from @code{string-any}.
962
963The SRFI-13 specification requires that the call to @var{pred}
964on the last character of @var{s} (assuming that point is
965reached) be a tail call, but currently in Guile this is not the
966case.
967@end deffn
968
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)
971Check if the predicate @var{pred} is true for every character
972in the string @var{s}.
973
974Calls to @var{pred} are made from left to right across @var{s}.
975If the predicate is true for every character then the return
976value from the last @var{pred} call is the return from
977@code{string-every}.
978
979If there are no characters in @var{s} (ie.@: @var{start} equals
980@var{end}) then the return is @code{#t}.
981
982The SRFI-13 specification requires that the call to @var{pred}
983on the last character of @var{s} (assuming that point is
984reached) be a tail call, but currently in Guile this is not the
985case.
986@end deffn
987
988@deffn {Scheme Procedure} inf? x
989@deffnx {C Function} scm_inf_p (x)
990Return @code{#t} if @var{x} is either @samp{+inf.0}
991or @samp{-inf.0}, @code{#f} otherwise.
992@end deffn
993
994