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