Creates a new value and initializes type to null.
| 10 | |
| 11 | // Creates a new value and initializes type to null. |
| 12 | engine_value *value_new() { |
| 13 | engine_value *val = malloc(sizeof(engine_value)); |
| 14 | if (val == NULL) { |
| 15 | errno = 1; |
| 16 | return NULL; |
| 17 | } |
| 18 | |
| 19 | VALUE_INIT(val->internal); |
| 20 | val->kind = KIND_NULL; |
| 21 | |
| 22 | errno = 0; |
| 23 | return val; |
| 24 | } |
| 25 | |
| 26 | // Returns engine value type. Usually compared against KIND_* constants, defined |
| 27 | // in the `value.h` header file. |
no outgoing calls
no test coverage detected