MCPcopy Create free account
hub / github.com/deuill/go-php / value_new

Function value_new

engine/value.c:12–24  ·  view source on GitHub ↗

Creates a new value and initializes type to null.

Source from the content-addressed store, hash-verified

10
11// Creates a new value and initializes type to null.
12engine_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.

Callers 4

value_array_keysFunction · 0.85
value_array_next_getFunction · 0.85
value_array_index_getFunction · 0.85
value_array_key_getFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected