Fun
0.41.5
The programming language that makes You have fun
Main Page
Data Structures
Files
File List
Globals
Loading...
Searching...
No Matches
src
vm
ini
free.c
Go to the documentation of this file.
1
/*
2
* This file is part of the Fun programming language.
3
* https://fun-lang.xyz/
4
*
5
* Copyright 2025 Johannes Findeisen <you@hanez.org>
6
* Licensed under the terms of the Apache-2.0 license.
7
* https://opensource.org/license/apache-2-0
8
*/
9
32
33
/* OP_INI_FREE: pops handle; pushes 1/0 */
34
#ifdef FUN_WITH_INI
35
case
OP_INI_FREE
: {
36
Value
vh
= pop_value(vm);
37
int
h = (
vh
.type ==
VAL_INT
) ? (
int
)
vh
.i : 0;
38
free_value
(
vh
);
39
int
ok
= ini_free_handle(h);
40
push_value(vm,
make_int
(
ok
));
41
break
;
42
}
43
#endif
OP_INI_FREE
@ OP_INI_FREE
Definition
bytecode.h:204
ok
int ok
Definition
contains.c:38
Value
Tagged union representing a Fun value.
Definition
value.h:68
vh
Value vh
Definition
stubs.c:44
free_value
void free_value(Value v)
Free dynamic storage owned by a Value.
Definition
value.c:517
make_int
Value make_int(int64_t v)
Construct a Value representing a 64-bit integer.
Definition
value.c:51
VAL_INT
@ VAL_INT
Definition
value.h:51
Generated on
for Fun by
1.16.1