Another place to produce debugging output in etags
[emacs.git] / src / module-env-25.h
blob675010b995bbe640b1b257fba90e69b6afd15b76
1 /* Structure size (for version checking). */
2 ptrdiff_t size;
4 /* Private data; users should not touch this. */
5 struct emacs_env_private *private_members;
7 /* Memory management. */
9 emacs_value (*make_global_ref) (emacs_env *env,
10 emacs_value any_reference)
11 EMACS_ATTRIBUTE_NONNULL(1);
13 void (*free_global_ref) (emacs_env *env,
14 emacs_value global_reference)
15 EMACS_ATTRIBUTE_NONNULL(1);
17 /* Non-local exit handling. */
19 enum emacs_funcall_exit (*non_local_exit_check) (emacs_env *env)
20 EMACS_ATTRIBUTE_NONNULL(1);
22 void (*non_local_exit_clear) (emacs_env *env)
23 EMACS_ATTRIBUTE_NONNULL(1);
25 enum emacs_funcall_exit (*non_local_exit_get)
26 (emacs_env *env,
27 emacs_value *non_local_exit_symbol_out,
28 emacs_value *non_local_exit_data_out)
29 EMACS_ATTRIBUTE_NONNULL(1, 2, 3);
31 void (*non_local_exit_signal) (emacs_env *env,
32 emacs_value non_local_exit_symbol,
33 emacs_value non_local_exit_data)
34 EMACS_ATTRIBUTE_NONNULL(1);
36 void (*non_local_exit_throw) (emacs_env *env,
37 emacs_value tag,
38 emacs_value value)
39 EMACS_ATTRIBUTE_NONNULL(1);
41 /* Function registration. */
43 emacs_value (*make_function) (emacs_env *env,
44 ptrdiff_t min_arity,
45 ptrdiff_t max_arity,
46 emacs_value (*function) (emacs_env *env,
47 ptrdiff_t nargs,
48 emacs_value args[],
49 void *)
50 EMACS_NOEXCEPT
51 EMACS_ATTRIBUTE_NONNULL(1),
52 const char *documentation,
53 void *data)
54 EMACS_ATTRIBUTE_NONNULL(1, 4);
56 emacs_value (*funcall) (emacs_env *env,
57 emacs_value function,
58 ptrdiff_t nargs,
59 emacs_value args[])
60 EMACS_ATTRIBUTE_NONNULL(1);
62 emacs_value (*intern) (emacs_env *env,
63 const char *symbol_name)
64 EMACS_ATTRIBUTE_NONNULL(1, 2);
66 /* Type conversion. */
68 emacs_value (*type_of) (emacs_env *env,
69 emacs_value value)
70 EMACS_ATTRIBUTE_NONNULL(1);
72 bool (*is_not_nil) (emacs_env *env, emacs_value value)
73 EMACS_ATTRIBUTE_NONNULL(1);
75 bool (*eq) (emacs_env *env, emacs_value a, emacs_value b)
76 EMACS_ATTRIBUTE_NONNULL(1);
78 intmax_t (*extract_integer) (emacs_env *env, emacs_value value)
79 EMACS_ATTRIBUTE_NONNULL(1);
81 emacs_value (*make_integer) (emacs_env *env, intmax_t value)
82 EMACS_ATTRIBUTE_NONNULL(1);
84 double (*extract_float) (emacs_env *env, emacs_value value)
85 EMACS_ATTRIBUTE_NONNULL(1);
87 emacs_value (*make_float) (emacs_env *env, double value)
88 EMACS_ATTRIBUTE_NONNULL(1);
90 /* Copy the content of the Lisp string VALUE to BUFFER as an utf8
91 null-terminated string.
93 SIZE must point to the total size of the buffer. If BUFFER is
94 NULL or if SIZE is not big enough, write the required buffer size
95 to SIZE and return true.
97 Note that SIZE must include the last null byte (e.g. "abc" needs
98 a buffer of size 4).
100 Return true if the string was successfully copied. */
102 bool (*copy_string_contents) (emacs_env *env,
103 emacs_value value,
104 char *buffer,
105 ptrdiff_t *size_inout)
106 EMACS_ATTRIBUTE_NONNULL(1, 4);
108 /* Create a Lisp string from a utf8 encoded string. */
109 emacs_value (*make_string) (emacs_env *env,
110 const char *contents, ptrdiff_t length)
111 EMACS_ATTRIBUTE_NONNULL(1, 2);
113 /* Embedded pointer type. */
114 emacs_value (*make_user_ptr) (emacs_env *env,
115 void (*fin) (void *) EMACS_NOEXCEPT,
116 void *ptr)
117 EMACS_ATTRIBUTE_NONNULL(1);
119 void *(*get_user_ptr) (emacs_env *env, emacs_value uptr)
120 EMACS_ATTRIBUTE_NONNULL(1);
121 void (*set_user_ptr) (emacs_env *env, emacs_value uptr, void *ptr)
122 EMACS_ATTRIBUTE_NONNULL(1);
124 void (*(*get_user_finalizer) (emacs_env *env, emacs_value uptr))
125 (void *) EMACS_NOEXCEPT EMACS_ATTRIBUTE_NONNULL(1);
126 void (*set_user_finalizer) (emacs_env *env,
127 emacs_value uptr,
128 void (*fin) (void *) EMACS_NOEXCEPT)
129 EMACS_ATTRIBUTE_NONNULL(1);
131 /* Vector functions. */
132 emacs_value (*vec_get) (emacs_env *env, emacs_value vec, ptrdiff_t i)
133 EMACS_ATTRIBUTE_NONNULL(1);
135 void (*vec_set) (emacs_env *env, emacs_value vec, ptrdiff_t i,
136 emacs_value val)
137 EMACS_ATTRIBUTE_NONNULL(1);
139 ptrdiff_t (*vec_size) (emacs_env *env, emacs_value vec)
140 EMACS_ATTRIBUTE_NONNULL(1);