@@ -1228,9 +1228,9 @@ the @var{runtime} structure with the value compiled into the module:
12281228
12291229@example
12301230int
1231- emacs_module_init (struct emacs_runtime *ert )
1231+ emacs_module_init (struct emacs_runtime *runtime )
12321232@{
1233- if (ert ->size < sizeof (*ert ))
1233+ if (runtime ->size < sizeof (*runtime ))
12341234 return 1;
12351235@}
12361236@end example
@@ -1247,7 +1247,7 @@ assumes it is part of the @code{emacs_module_init} function shown
12471247above:
12481248
12491249@example
1250- emacs_env *env = ert ->get_environment (ert );
1250+ emacs_env *env = runtime ->get_environment (runtime );
12511251 if (env->size < sizeof (*env))
12521252 return 2;
12531253@end example
@@ -1264,7 +1264,7 @@ Emacs, by comparing the size of the environment passed by Emacs with
12641264known sizes, like this:
12651265
12661266@example
1267- emacs_env *env = ert ->get_environment (ert );
1267+ emacs_env *env = runtime ->get_environment (runtime );
12681268 if (env->size >= sizeof (struct emacs_env_26))
12691269 emacs_version = 26; /* Emacs 26 or later. */
12701270 else if (env->size >= sizeof (struct emacs_env_25))
@@ -1388,7 +1388,7 @@ Combining the above steps, code that arranges for a C function
13881388look like this, as part of the module initialization function:
13891389
13901390@example
1391- emacs_env *env = ert ->get_environment (ert );
1391+ emacs_env *env = runtime ->get_environment (runtime );
13921392 emacs_value func = env->make_function (env, min_arity, max_arity,
13931393 module_func, docstring, data);
13941394 emacs_value symbol = env->intern (env, "module-func");
@@ -1508,9 +1508,10 @@ overflow in the size calculation.
15081508@end deftypefn
15091509
15101510@deftp {Type alias} emacs_limb_t
1511- This is an unsigned integer type,
1512- used as the element type for the magnitude arrays for the big
1513- integer conversion functions.
1511+ This is an unsigned integer type, used as the element type for the
1512+ magnitude arrays for the big integer conversion functions. The type
1513+ is guaranteed to have unique object representations, i.e., no padding
1514+ bits.
15141515@end deftp
15151516
15161517@defvr Macro EMACS_LIMB_MAX
@@ -1524,12 +1525,11 @@ This function returns the value of a Lisp float specified by
15241525@var {arg }, as a C @code {double } value.
15251526@end deftypefn
15261527
1527- @deftypefn Function struct timespec extract_time (emacs_env * @var {env }, emacs_value @var {time })
1528- This function, which is available since Emacs 27, interprets
1529- @var {time } as an Emacs Lisp time value and returns the corresponding
1530- @code {struct timespec }. @xref {Time of Day }. @code {struct timespec }
1531- represents a timestamp with nanosecond precision. It has the
1532- following members:
1528+ @deftypefn Function struct timespec extract_time (emacs_env * @var {env }, emacs_value @var {arg })
1529+ This function, which is available since Emacs 27, interprets @var {arg }
1530+ as an Emacs Lisp time value and returns the corresponding @code {struct
1531+ timespec }. @xref {Time of Day }. @code {struct timespec } represents a
1532+ timestamp with nanosecond precision. It has the following members:
15331533
15341534@table @code
15351535@item time_t tv_sec
@@ -1727,9 +1727,9 @@ next_prime (emacs_env *env, ptrdiff_t nargs, emacs_value *args,
17271727@}
17281728
17291729int
1730- emacs_module_init (struct emacs_runtime *ert )
1730+ emacs_module_init (struct emacs_runtime *runtime )
17311731@{
1732- emacs_env *env = ert ->get_environment (ert );
1732+ emacs_env *env = runtime ->get_environment (runtime );
17331733 emacs_value symbol = env->intern (env, "next-prime");
17341734 emacs_value func
17351735 = env->make_function (env, 1, 1, next_prime, NULL, NULL);
@@ -1756,16 +1756,15 @@ there's no requirement that @var{time} be normalized. This means that
17561756@code {@var {time }.tv_nsec } can be negative or larger than 999,999,999.
17571757@end deftypefn
17581758
1759- @deftypefn Function emacs_value make_string (emacs_env * @var {env }, const char * @var {str }, ptrdiff_t @var {strlen })
1759+ @deftypefn Function emacs_value make_string (emacs_env * @var {env }, const char * @var {str }, ptrdiff_t @var {len })
17601760This function creates an Emacs string from C text string pointed by
17611761@var {str } whose length in bytes, not including the terminating null
1762- byte, is @var {strlen }. The original string in @var {str } can be either
1763- an @acronym {ASCII } string or a UTF-8 encoded non-@acronym {ASCII }
1764- string; it can include embedded null bytes, and doesn't have to end in
1765- a terminating null byte at @code {@var {str }[ @var {strlen }] }. The
1766- function raises the @code {overflow-error } error condition if
1767- @var {strlen } is negative or exceeds the maximum length of an Emacs
1768- string.
1762+ byte, is @var {len }. The original string in @var {str } can be either an
1763+ @acronym {ASCII } string or a UTF-8 encoded non-@acronym {ASCII } string;
1764+ it can include embedded null bytes, and doesn't have to end in a
1765+ terminating null byte at @code {@var {str }[ @var {len }] }. The function
1766+ raises the @code {overflow-error } error condition if @var {len } is
1767+ negative or exceeds the maximum length of an Emacs string.
17691768@end deftypefn
17701769
17711770The @acronym {API } does not provide functions to manipulate Lisp data
@@ -1822,25 +1821,27 @@ garbage-collected. Don't run any expensive code in a finalizer,
18221821because GC must finish quickly to keep Emacs responsive.
18231822@end deftypefn
18241823
1825- @deftypefn Function void *get_user_ptr (emacs_env * @var {env }, emacs_value val )
1824+ @deftypefn Function void *get_user_ptr (emacs_env * @var {env }, emacs_value @var { arg } )
18261825This function extracts the C pointer from the Lisp object represented
1827- by @var {val }.
1826+ by @var {arg }.
18281827@end deftypefn
18291828
1830- @deftypefn Function void set_user_ptr (emacs_env * @var {env }, emacs_value @var {value }, void * @var {ptr })
1829+ @deftypefn Function void set_user_ptr (emacs_env * @var {env }, emacs_value @var {arg }, void * @var {ptr })
18311830This function sets the C pointer embedded in the @code {user-ptr }
1832- object represented by @var {value } to @var {ptr }.
1831+ object represented by @var {arg } to @var {ptr }.
18331832@end deftypefn
18341833
1835- @deftypefn Function emacs_finalizer get_user_finalizer (emacs_env * @var {env }, emacs_value val )
1834+ @deftypefn Function emacs_finalizer get_user_finalizer (emacs_env * @var {env }, emacs_value @var { arg } )
18361835This function returns the finalizer of the @code {user-ptr } object
1837- represented by @var {val }, or @code {NULL } if it doesn't have a finalizer.
1836+ represented by @var {arg }, or @code {NULL } if it doesn't have a
1837+ finalizer.
18381838@end deftypefn
18391839
1840- @deftypefn Function void set_user_finalizer (emacs_env * @var {env }, emacs_value @var {val }, emacs_finalizer @var {fin })
1840+ @deftypefn Function void set_user_finalizer (emacs_env * @var {env }, emacs_value @var {arg }, emacs_finalizer @var {fin })
18411841This function changes the finalizer of the @code {user-ptr } object
1842- represented by @var {val } to be @var {fin }. If @var {fin } is a
1843- @code {NULL } pointer, the @code {user-ptr } object will have no finalizer.
1842+ represented by @var {arg } to be @var {fin }. If @var {fin } is a
1843+ @code {NULL } pointer, the @code {user-ptr } object will have no
1844+ finalizer.
18441845@end deftypefn
18451846
18461847@node Module Misc
@@ -1853,20 +1854,20 @@ be called via the @code{emacs_env} pointer. Description of functions
18531854that were introduced after Emacs 25 calls out the first version where
18541855they became available.
18551856
1856- @deftypefn Function bool eq (emacs_env * @var {env }, emacs_value @var {val1 }, emacs_value @var {val2 })
1857+ @deftypefn Function bool eq (emacs_env * @var {env }, emacs_value @var {a }, emacs_value @var {b })
18571858This function returns @code {true } if the Lisp objects represented by
1858- @var {val1 } and @var {val2 } are identical, @code {false } otherwise. This
1859- is the same as the Lisp function @code {eq } (@pxref {Equality
1860- Predicates }), but avoids the need to intern the objects represented by
1861- the arguments.
1859+ @var {a } and @var {b } are identical, @code {false } otherwise. This is
1860+ the same as the Lisp function @code {eq } (@pxref {Equality Predicates }),
1861+ but avoids the need to intern the objects represented by the
1862+ arguments.
18621863
18631864There are no @acronym {API } functions for other equality predicates, so
18641865you will need to use @code {intern } and @code {funcall }, described
18651866below, to perform more complex equality tests.
18661867@end deftypefn
18671868
1868- @deftypefn Function bool is_not_nil (emacs_env * @var {env }, emacs_value @var {val })
1869- This function tests whether the Lisp object represented by @var {val }
1869+ @deftypefn Function bool is_not_nil (emacs_env * @var {env }, emacs_value @var {arg })
1870+ This function tests whether the Lisp object represented by @var {arg }
18701871is non-@code {nil }; it returns @code {true } or @code {false } accordingly.
18711872
18721873Note that you could implement an equivalent test by using
@@ -1875,12 +1876,12 @@ then use @code{eq}, described above, to test for equality. But using
18751876this function is more convenient.
18761877@end deftypefn
18771878
1878- @deftypefn Function emacs_value type_of (emacs_env * @var {env }, emacs_value @code {object })
1879- This function returns the type of @var {object } as a value that
1880- represents a symbol: @code {string } for a string, @code {integer } for an
1881- integer, @code {process } for a process, etc. @xref {Type Predicates }.
1882- You can use @code {intern } and @code {eq } to compare against known type
1883- symbols, if your code needs to depend on the object type.
1879+ @deftypefn Function emacs_value type_of (emacs_env * @var {env }, emacs_value @code {arg })
1880+ This function returns the type of @var {arg } as a value that represents
1881+ a symbol: @code {string } for a string, @code {integer } for an integer,
1882+ @code {process } for a process, etc. @xref {Type Predicates }. You can
1883+ use @code {intern } and @code {eq } to compare against known type symbols,
1884+ if your code needs to depend on the object type.
18841885@end deftypefn
18851886
18861887@anchor {intern }
@@ -2054,11 +2055,12 @@ One use of this function is when you want to re-throw a non-local exit
20542055from one of the called @acronym {API } or Lisp functions.
20552056@end deftypefn
20562057
2057- @deftypefn Function void non_local_exit_signal (emacs_env * @var {env }, emacs_value @var {error }, emacs_value @var {data })
2058- This function signals the error represented by @var {error } with the
2059- specified error data @var {data }. The module function should return
2060- soon after calling this function. This function could be useful,
2061- e.g., for signaling errors from module functions to Emacs.
2058+ @deftypefn Function void non_local_exit_signal (emacs_env * @var {env }, emacs_value @var {symbol }, emacs_value @var {data })
2059+ This function signals the error represented by the error symbol
2060+ @var {symbol } with the specified error data @var {data }. The module
2061+ function should return soon after calling this function. This
2062+ function could be useful, e.g., for signaling errors from module
2063+ functions to Emacs.
20622064@end deftypefn
20632065
20642066
0 commit comments