File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 36
36
cue_free_all (uintptr_t * p ) {
37
37
cue_free_all_inner_raw (p , cue_cgo_handle_slice_len (p ));
38
38
free (p );
39
- }
39
+ }
40
+
41
+ void
42
+ libc_free (void * p ) {
43
+ free (p );
44
+ }
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ cue_error cue_validate(cue_value, cue_eopt*);
123
123
cue_value cue_default (cue_value , bool * );
124
124
cue_kind cue_concrete_kind (cue_value );
125
125
cue_kind cue_incomplete_kind (cue_value );
126
+ cue_error cue_value_error (cue_value );
126
127
bool cue_is_equal (cue_value , cue_value );
127
128
128
129
cue_bopt cue_filename (char * );
@@ -151,6 +152,7 @@ char* cue_attr_value(cue_attr);
151
152
152
153
void cue_free (uintptr_t );
153
154
void cue_free_all (uintptr_t * );
155
+ void libc_free (void * );
154
156
155
157
#ifdef __cplusplus
156
158
}
Original file line number Diff line number Diff line change @@ -274,4 +274,12 @@ func cue_incomplete_kind(v C.cue_value) C.cue_kind {
274
274
return C .CUE_KIND_TOP
275
275
}
276
276
panic ("unreachable" )
277
- }
277
+ }
278
+
279
+ //export cue_value_error
280
+ func cue_value_error (v C.cue_value ) C.cue_error {
281
+ if err := cueValue (v ).Err (); err != nil {
282
+ return cueErrorHandle (err )
283
+ }
284
+ return 0
285
+ }
You can’t perform that action at this time.
0 commit comments