objective-lol 0.0.1__cp311-cp311-macosx_10_9_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
objective_lol/api.go ADDED
@@ -0,0 +1,3562 @@
1
+ /*
2
+ cgo stubs for package api.
3
+ File is generated by gopy. Do not edit.
4
+ gopy build -no-make -dynamic-link=True -symbols=False -output /Users/runner/work/objective-lol/objective-lol/python/build/lib.macosx-10.9-x86_64-cpython-311/objective_lol --vm /Users/runner/work/objective-lol/objective-lol/python/.toolchain/python/python-3.11.13/bin/python3 .
5
+ */
6
+
7
+ package main
8
+
9
+ /*
10
+
11
+ #cgo CFLAGS: "-I/Users/runner/work/objective-lol/objective-lol/python/.toolchain/python/python-3.11.13/include/python3.11" -Wno-error -Wno-implicit-function-declaration -Wno-int-conversion
12
+ #cgo LDFLAGS: -pthread -dynamiclib -headerpad_max_install_names -undefined dynamic_lookup
13
+
14
+ // #define Py_LIMITED_API // need full API for PyRun*
15
+ #include <Python.h>
16
+ typedef uint8_t bool;
17
+ // static inline is trick for avoiding need for extra .c file
18
+ // the following are used for build value -- switch on reflect.Kind
19
+ // or the types equivalent
20
+ static inline PyObject* gopy_build_bool(uint8_t val) {
21
+ return Py_BuildValue("b", val);
22
+ }
23
+ static inline PyObject* gopy_build_int64(int64_t val) {
24
+ return Py_BuildValue("k", val);
25
+ }
26
+ static inline PyObject* gopy_build_uint64(uint64_t val) {
27
+ return Py_BuildValue("K", val);
28
+ }
29
+ static inline PyObject* gopy_build_float64(double val) {
30
+ return Py_BuildValue("d", val);
31
+ }
32
+ static inline PyObject* gopy_build_string(const char* val) {
33
+ return Py_BuildValue("s", val);
34
+ }
35
+ static inline void gopy_decref(PyObject* obj) { // macro
36
+ Py_XDECREF(obj);
37
+ }
38
+ static inline void gopy_incref(PyObject* obj) { // macro
39
+ Py_XINCREF(obj);
40
+ }
41
+ static inline int gopy_method_check(PyObject* obj) { // macro
42
+ return PyMethod_Check(obj);
43
+ }
44
+ static inline void gopy_err_handle() {
45
+ if(PyErr_Occurred() != NULL) {
46
+ PyErr_Print();
47
+ }
48
+ }
49
+
50
+ */
51
+ import "C"
52
+ import (
53
+ "errors"
54
+ "reflect"
55
+ "unsafe"
56
+
57
+ "github.com/go-python/gopy/gopyh" // handler
58
+
59
+ "context"
60
+ "io"
61
+ "time"
62
+
63
+ "github.com/bjia56/objective-lol/pkg/api"
64
+ "github.com/bjia56/objective-lol/pkg/environment"
65
+ )
66
+
67
+ // main doesn't do anything in lib / pkg mode, but is essential for exe mode
68
+ func main() {
69
+
70
+ }
71
+
72
+ // initialization functions -- can be called from python after library is loaded
73
+ // GoPyInitRunFile runs a separate python file -- call in GoPyInit if it
74
+ // steals the main thread e.g., for GUI event loop, as in GoGi startup.
75
+
76
+ //export GoPyInit
77
+ func GoPyInit() {
78
+
79
+ }
80
+
81
+ // type for the handle -- int64 for speed (can switch to string)
82
+ type GoHandle int64
83
+ type CGoHandle C.longlong
84
+
85
+ // DecRef decrements the reference count for the specified handle
86
+ // and deletes it it goes to zero.
87
+ //
88
+ //export DecRef
89
+ func DecRef(handle CGoHandle) {
90
+ gopyh.DecRef(gopyh.CGoHandle(handle))
91
+ }
92
+
93
+ // IncRef increments the reference count for the specified handle.
94
+ //
95
+ //export IncRef
96
+ func IncRef(handle CGoHandle) {
97
+ gopyh.IncRef(gopyh.CGoHandle(handle))
98
+ }
99
+
100
+ // NumHandles returns the number of handles currently in use.
101
+ //
102
+ //export NumHandles
103
+ func NumHandles() int {
104
+ return gopyh.NumHandles()
105
+ }
106
+
107
+ // boolGoToPy converts a Go bool to python-compatible C.char
108
+ func boolGoToPy(b bool) C.char {
109
+ if b {
110
+ return 1
111
+ }
112
+ return 0
113
+ }
114
+
115
+ // boolPyToGo converts a python-compatible C.Char to Go bool
116
+ func boolPyToGo(b C.char) bool {
117
+ if b != 0 {
118
+ return true
119
+ }
120
+ return false
121
+ }
122
+
123
+ func complex64GoToPy(c complex64) *C.PyObject {
124
+ return C.PyComplex_FromDoubles(C.double(real(c)), C.double(imag(c)))
125
+ }
126
+
127
+ func complex64PyToGo(o *C.PyObject) complex64 {
128
+ v := C.PyComplex_AsCComplex(o)
129
+ return complex(float32(v.real), float32(v.imag))
130
+ }
131
+
132
+ func complex128GoToPy(c complex128) *C.PyObject {
133
+ return C.PyComplex_FromDoubles(C.double(real(c)), C.double(imag(c)))
134
+ }
135
+
136
+ func complex128PyToGo(o *C.PyObject) complex128 {
137
+ v := C.PyComplex_AsCComplex(o)
138
+ return complex(float64(v.real), float64(v.imag))
139
+ }
140
+
141
+ // errorGoToPy converts a Go error to python-compatible C.CString
142
+ func errorGoToPy(e error) *C.char {
143
+ if e != nil {
144
+ return C.CString(e.Error())
145
+ }
146
+ return C.CString("")
147
+ }
148
+
149
+ // --- generated code for package: api below: ---
150
+
151
+ // ---- External Types Outside of Targeted Packages ---
152
+
153
+ // Converters for pointer handles for type: *environment.Class
154
+ func ptrFromHandle_Ptr_environment_Class(h CGoHandle) *environment.Class {
155
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*environment.Class")
156
+ if p == nil {
157
+ return nil
158
+ }
159
+ return gopyh.Embed(p, reflect.TypeOf(environment.Class{})).(*environment.Class)
160
+ }
161
+ func handleFromPtr_Ptr_environment_Class(p interface{}) CGoHandle {
162
+ return CGoHandle(gopyh.Register("*environment.Class", p))
163
+ }
164
+
165
+ // Converters for pointer handles for type: *environment.Environment
166
+ func ptrFromHandle_Ptr_environment_Environment(h CGoHandle) *environment.Environment {
167
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*environment.Environment")
168
+ if p == nil {
169
+ return nil
170
+ }
171
+ return gopyh.Embed(p, reflect.TypeOf(environment.Environment{})).(*environment.Environment)
172
+ }
173
+ func handleFromPtr_Ptr_environment_Environment(p interface{}) CGoHandle {
174
+ return CGoHandle(gopyh.Register("*environment.Environment", p))
175
+ }
176
+
177
+ // Converters for pointer handles for type: *environment.Function
178
+ func ptrFromHandle_Ptr_environment_Function(h CGoHandle) *environment.Function {
179
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*environment.Function")
180
+ if p == nil {
181
+ return nil
182
+ }
183
+ return gopyh.Embed(p, reflect.TypeOf(environment.Function{})).(*environment.Function)
184
+ }
185
+ func handleFromPtr_Ptr_environment_Function(p interface{}) CGoHandle {
186
+ return CGoHandle(gopyh.Register("*environment.Function", p))
187
+ }
188
+
189
+ // Converters for pointer handles for type: *environment.MemberVariable
190
+ func ptrFromHandle_Ptr_environment_MemberVariable(h CGoHandle) *environment.MemberVariable {
191
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*environment.MemberVariable")
192
+ if p == nil {
193
+ return nil
194
+ }
195
+ return gopyh.Embed(p, reflect.TypeOf(environment.MemberVariable{})).(*environment.MemberVariable)
196
+ }
197
+ func handleFromPtr_Ptr_environment_MemberVariable(p interface{}) CGoHandle {
198
+ return CGoHandle(gopyh.Register("*environment.MemberVariable", p))
199
+ }
200
+
201
+ // Converters for pointer handles for type: *environment.ObjectInstance
202
+ func ptrFromHandle_Ptr_environment_ObjectInstance(h CGoHandle) *environment.ObjectInstance {
203
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*environment.ObjectInstance")
204
+ if p == nil {
205
+ return nil
206
+ }
207
+ return gopyh.Embed(p, reflect.TypeOf(environment.ObjectInstance{})).(*environment.ObjectInstance)
208
+ }
209
+ func handleFromPtr_Ptr_environment_ObjectInstance(p interface{}) CGoHandle {
210
+ return CGoHandle(gopyh.Register("*environment.ObjectInstance", p))
211
+ }
212
+
213
+ // Converters for pointer handles for type: *environment.Variable
214
+ func ptrFromHandle_Ptr_environment_Variable(h CGoHandle) *environment.Variable {
215
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*environment.Variable")
216
+ if p == nil {
217
+ return nil
218
+ }
219
+ return gopyh.Embed(p, reflect.TypeOf(environment.Variable{})).(*environment.Variable)
220
+ }
221
+ func handleFromPtr_Ptr_environment_Variable(p interface{}) CGoHandle {
222
+ return CGoHandle(gopyh.Register("*environment.Variable", p))
223
+ }
224
+
225
+ // Converters for pointer handles for type: context.Context
226
+ func ptrFromHandle_context_Context(h CGoHandle) context.Context {
227
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "context.Context")
228
+ if p == nil {
229
+ return nil
230
+ }
231
+ return p.(context.Context)
232
+ }
233
+ func handleFromPtr_context_Context(p interface{}) CGoHandle {
234
+ return CGoHandle(gopyh.Register("context.Context", p))
235
+ }
236
+
237
+ // Converters for non-pointer handles for type: environment.Class
238
+ func ptrFromHandle_environment_Class(h CGoHandle) *environment.Class {
239
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "environment.Class")
240
+ if p == nil {
241
+ return nil
242
+ }
243
+ return gopyh.Embed(p, reflect.TypeOf(environment.Class{})).(*environment.Class)
244
+ }
245
+ func handleFromPtr_environment_Class(p interface{}) CGoHandle {
246
+ return CGoHandle(gopyh.Register("environment.Class", p))
247
+ }
248
+
249
+ // Converters for non-pointer handles for type: environment.Environment
250
+ func ptrFromHandle_environment_Environment(h CGoHandle) *environment.Environment {
251
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "environment.Environment")
252
+ if p == nil {
253
+ return nil
254
+ }
255
+ return gopyh.Embed(p, reflect.TypeOf(environment.Environment{})).(*environment.Environment)
256
+ }
257
+ func handleFromPtr_environment_Environment(p interface{}) CGoHandle {
258
+ return CGoHandle(gopyh.Register("environment.Environment", p))
259
+ }
260
+
261
+ // Converters for non-pointer handles for type: environment.Function
262
+ func ptrFromHandle_environment_Function(h CGoHandle) *environment.Function {
263
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "environment.Function")
264
+ if p == nil {
265
+ return nil
266
+ }
267
+ return gopyh.Embed(p, reflect.TypeOf(environment.Function{})).(*environment.Function)
268
+ }
269
+ func handleFromPtr_environment_Function(p interface{}) CGoHandle {
270
+ return CGoHandle(gopyh.Register("environment.Function", p))
271
+ }
272
+
273
+ // Converters for non-pointer handles for type: environment.MemberVariable
274
+ func ptrFromHandle_environment_MemberVariable(h CGoHandle) *environment.MemberVariable {
275
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "environment.MemberVariable")
276
+ if p == nil {
277
+ return nil
278
+ }
279
+ return gopyh.Embed(p, reflect.TypeOf(environment.MemberVariable{})).(*environment.MemberVariable)
280
+ }
281
+ func handleFromPtr_environment_MemberVariable(p interface{}) CGoHandle {
282
+ return CGoHandle(gopyh.Register("environment.MemberVariable", p))
283
+ }
284
+
285
+ // Converters for non-pointer handles for type: environment.ObjectInstance
286
+ func ptrFromHandle_environment_ObjectInstance(h CGoHandle) *environment.ObjectInstance {
287
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "environment.ObjectInstance")
288
+ if p == nil {
289
+ return nil
290
+ }
291
+ return gopyh.Embed(p, reflect.TypeOf(environment.ObjectInstance{})).(*environment.ObjectInstance)
292
+ }
293
+ func handleFromPtr_environment_ObjectInstance(p interface{}) CGoHandle {
294
+ return CGoHandle(gopyh.Register("environment.ObjectInstance", p))
295
+ }
296
+
297
+ // Converters for non-pointer handles for type: environment.Parameter
298
+ func ptrFromHandle_environment_Parameter(h CGoHandle) *environment.Parameter {
299
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "environment.Parameter")
300
+ if p == nil {
301
+ return nil
302
+ }
303
+ return gopyh.Embed(p, reflect.TypeOf(environment.Parameter{})).(*environment.Parameter)
304
+ }
305
+ func handleFromPtr_environment_Parameter(p interface{}) CGoHandle {
306
+ return CGoHandle(gopyh.Register("environment.Parameter", p))
307
+ }
308
+
309
+ // Converters for pointer handles for type: environment.Value
310
+ func ptrFromHandle_environment_Value(h CGoHandle) environment.Value {
311
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "environment.Value")
312
+ if p == nil {
313
+ return nil
314
+ }
315
+ return p.(environment.Value)
316
+ }
317
+ func handleFromPtr_environment_Value(p interface{}) CGoHandle {
318
+ return CGoHandle(gopyh.Register("environment.Value", p))
319
+ }
320
+
321
+ // Converters for non-pointer handles for type: environment.Variable
322
+ func ptrFromHandle_environment_Variable(h CGoHandle) *environment.Variable {
323
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "environment.Variable")
324
+ if p == nil {
325
+ return nil
326
+ }
327
+ return gopyh.Embed(p, reflect.TypeOf(environment.Variable{})).(*environment.Variable)
328
+ }
329
+ func handleFromPtr_environment_Variable(p interface{}) CGoHandle {
330
+ return CGoHandle(gopyh.Register("environment.Variable", p))
331
+ }
332
+
333
+ // Converters for pointer handles for type: io.Reader
334
+ func ptrFromHandle_io_Reader(h CGoHandle) io.Reader {
335
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "io.Reader")
336
+ if p == nil {
337
+ return nil
338
+ }
339
+ return p.(io.Reader)
340
+ }
341
+ func handleFromPtr_io_Reader(p interface{}) CGoHandle {
342
+ return CGoHandle(gopyh.Register("io.Reader", p))
343
+ }
344
+
345
+ // Converters for pointer handles for type: io.Writer
346
+ func ptrFromHandle_io_Writer(h CGoHandle) io.Writer {
347
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "io.Writer")
348
+ if p == nil {
349
+ return nil
350
+ }
351
+ return p.(io.Writer)
352
+ }
353
+ func handleFromPtr_io_Writer(p interface{}) CGoHandle {
354
+ return CGoHandle(gopyh.Register("io.Writer", p))
355
+ }
356
+
357
+ // ---- Package: go ---
358
+
359
+ // ---- Types ---
360
+
361
+ // Converters for implicit pointer handles for type: []bool
362
+ func ptrFromHandle_Slice_bool(h CGoHandle) *[]bool {
363
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]bool")
364
+ if p == nil {
365
+ return nil
366
+ }
367
+ return p.(*[]bool)
368
+ }
369
+ func deptrFromHandle_Slice_bool(h CGoHandle) []bool {
370
+ p := ptrFromHandle_Slice_bool(h)
371
+ if p == nil {
372
+ return nil
373
+ }
374
+ return *p
375
+ }
376
+ func handleFromPtr_Slice_bool(p interface{}) CGoHandle {
377
+ return CGoHandle(gopyh.Register("[]bool", p))
378
+ }
379
+
380
+ // --- wrapping slice: []bool ---
381
+ //
382
+ //export Slice_bool_CTor
383
+ func Slice_bool_CTor() CGoHandle {
384
+ return CGoHandle(handleFromPtr_Slice_bool(&[]bool{}))
385
+ }
386
+
387
+ //export Slice_bool_len
388
+ func Slice_bool_len(handle CGoHandle) int {
389
+ return len(deptrFromHandle_Slice_bool(handle))
390
+ }
391
+
392
+ //export Slice_bool_elem
393
+ func Slice_bool_elem(handle CGoHandle, _idx int) C.char {
394
+ s := deptrFromHandle_Slice_bool(handle)
395
+ return boolGoToPy(s[_idx])
396
+ }
397
+
398
+ //export Slice_bool_subslice
399
+ func Slice_bool_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
400
+ s := deptrFromHandle_Slice_bool(handle)
401
+ ss := s[_st:_ed]
402
+ return CGoHandle(handleFromPtr_Slice_bool(&ss))
403
+ }
404
+
405
+ //export Slice_bool_set
406
+ func Slice_bool_set(handle CGoHandle, _idx int, _vl C.char) {
407
+ s := deptrFromHandle_Slice_bool(handle)
408
+ s[_idx] = boolPyToGo(_vl)
409
+ }
410
+
411
+ //export Slice_bool_append
412
+ func Slice_bool_append(handle CGoHandle, _vl C.char) {
413
+ s := ptrFromHandle_Slice_bool(handle)
414
+ *s = append(*s, boolPyToGo(_vl))
415
+ }
416
+
417
+ // Converters for implicit pointer handles for type: []byte
418
+ func ptrFromHandle_Slice_byte(h CGoHandle) *[]byte {
419
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]byte")
420
+ if p == nil {
421
+ return nil
422
+ }
423
+ return p.(*[]byte)
424
+ }
425
+ func deptrFromHandle_Slice_byte(h CGoHandle) []byte {
426
+ p := ptrFromHandle_Slice_byte(h)
427
+ if p == nil {
428
+ return nil
429
+ }
430
+ return *p
431
+ }
432
+ func handleFromPtr_Slice_byte(p interface{}) CGoHandle {
433
+ return CGoHandle(gopyh.Register("[]byte", p))
434
+ }
435
+
436
+ // --- wrapping slice: []byte ---
437
+ //
438
+ //export Slice_byte_CTor
439
+ func Slice_byte_CTor() CGoHandle {
440
+ return CGoHandle(handleFromPtr_Slice_byte(&[]byte{}))
441
+ }
442
+
443
+ //export Slice_byte_len
444
+ func Slice_byte_len(handle CGoHandle) int {
445
+ return len(deptrFromHandle_Slice_byte(handle))
446
+ }
447
+
448
+ //export Slice_byte_elem
449
+ func Slice_byte_elem(handle CGoHandle, _idx int) C.char {
450
+ s := deptrFromHandle_Slice_byte(handle)
451
+ return C.char(s[_idx])
452
+ }
453
+
454
+ //export Slice_byte_subslice
455
+ func Slice_byte_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
456
+ s := deptrFromHandle_Slice_byte(handle)
457
+ ss := s[_st:_ed]
458
+ return CGoHandle(handleFromPtr_Slice_byte(&ss))
459
+ }
460
+
461
+ //export Slice_byte_set
462
+ func Slice_byte_set(handle CGoHandle, _idx int, _vl C.char) {
463
+ s := deptrFromHandle_Slice_byte(handle)
464
+ s[_idx] = byte(_vl)
465
+ }
466
+
467
+ //export Slice_byte_append
468
+ func Slice_byte_append(handle CGoHandle, _vl C.char) {
469
+ s := ptrFromHandle_Slice_byte(handle)
470
+ *s = append(*s, byte(_vl))
471
+ }
472
+
473
+ //export Slice_byte_from_bytes
474
+ func Slice_byte_from_bytes(o *C.PyObject) CGoHandle {
475
+ size := C.PyBytes_Size(o)
476
+ ptr := unsafe.Pointer(C.PyBytes_AsString(o))
477
+ data := make([]byte, size)
478
+ tmp := unsafe.Slice((*byte)(ptr), size)
479
+ copy(data, tmp)
480
+ return handleFromPtr_Slice_byte(&data)
481
+ }
482
+
483
+ //export Slice_byte_to_bytes
484
+ func Slice_byte_to_bytes(handle CGoHandle) *C.PyObject {
485
+ s := deptrFromHandle_Slice_byte(handle)
486
+ ptr := unsafe.Pointer(&s[0])
487
+ size := len(s)
488
+ return C.PyBytes_FromStringAndSize((*C.char)(ptr), C.long(size))
489
+ }
490
+
491
+ // Converters for implicit pointer handles for type: []error
492
+ func ptrFromHandle_Slice_error(h CGoHandle) *[]error {
493
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]error")
494
+ if p == nil {
495
+ return nil
496
+ }
497
+ return p.(*[]error)
498
+ }
499
+ func deptrFromHandle_Slice_error(h CGoHandle) []error {
500
+ p := ptrFromHandle_Slice_error(h)
501
+ if p == nil {
502
+ return nil
503
+ }
504
+ return *p
505
+ }
506
+ func handleFromPtr_Slice_error(p interface{}) CGoHandle {
507
+ return CGoHandle(gopyh.Register("[]error", p))
508
+ }
509
+
510
+ // --- wrapping slice: []error ---
511
+ //
512
+ //export Slice_error_CTor
513
+ func Slice_error_CTor() CGoHandle {
514
+ return CGoHandle(handleFromPtr_Slice_error(&[]error{}))
515
+ }
516
+
517
+ //export Slice_error_len
518
+ func Slice_error_len(handle CGoHandle) int {
519
+ return len(deptrFromHandle_Slice_error(handle))
520
+ }
521
+
522
+ //export Slice_error_elem
523
+ func Slice_error_elem(handle CGoHandle, _idx int) *C.char {
524
+ s := deptrFromHandle_Slice_error(handle)
525
+ return errorGoToPy(s[_idx])
526
+ }
527
+
528
+ //export Slice_error_subslice
529
+ func Slice_error_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
530
+ s := deptrFromHandle_Slice_error(handle)
531
+ ss := s[_st:_ed]
532
+ return CGoHandle(handleFromPtr_Slice_error(&ss))
533
+ }
534
+
535
+ //export Slice_error_set
536
+ func Slice_error_set(handle CGoHandle, _idx int, _vl *C.char) {
537
+ s := deptrFromHandle_Slice_error(handle)
538
+ s[_idx] = errors.New(C.GoString(_vl))
539
+ }
540
+
541
+ //export Slice_error_append
542
+ func Slice_error_append(handle CGoHandle, _vl *C.char) {
543
+ s := ptrFromHandle_Slice_error(handle)
544
+ *s = append(*s, errors.New(C.GoString(_vl)))
545
+ }
546
+
547
+ // Converters for implicit pointer handles for type: []float32
548
+ func ptrFromHandle_Slice_float32(h CGoHandle) *[]float32 {
549
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]float32")
550
+ if p == nil {
551
+ return nil
552
+ }
553
+ return p.(*[]float32)
554
+ }
555
+ func deptrFromHandle_Slice_float32(h CGoHandle) []float32 {
556
+ p := ptrFromHandle_Slice_float32(h)
557
+ if p == nil {
558
+ return nil
559
+ }
560
+ return *p
561
+ }
562
+ func handleFromPtr_Slice_float32(p interface{}) CGoHandle {
563
+ return CGoHandle(gopyh.Register("[]float32", p))
564
+ }
565
+
566
+ // --- wrapping slice: []float32 ---
567
+ //
568
+ //export Slice_float32_CTor
569
+ func Slice_float32_CTor() CGoHandle {
570
+ return CGoHandle(handleFromPtr_Slice_float32(&[]float32{}))
571
+ }
572
+
573
+ //export Slice_float32_len
574
+ func Slice_float32_len(handle CGoHandle) int {
575
+ return len(deptrFromHandle_Slice_float32(handle))
576
+ }
577
+
578
+ //export Slice_float32_elem
579
+ func Slice_float32_elem(handle CGoHandle, _idx int) C.float {
580
+ s := deptrFromHandle_Slice_float32(handle)
581
+ return C.float(s[_idx])
582
+ }
583
+
584
+ //export Slice_float32_subslice
585
+ func Slice_float32_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
586
+ s := deptrFromHandle_Slice_float32(handle)
587
+ ss := s[_st:_ed]
588
+ return CGoHandle(handleFromPtr_Slice_float32(&ss))
589
+ }
590
+
591
+ //export Slice_float32_set
592
+ func Slice_float32_set(handle CGoHandle, _idx int, _vl C.float) {
593
+ s := deptrFromHandle_Slice_float32(handle)
594
+ s[_idx] = float32(_vl)
595
+ }
596
+
597
+ //export Slice_float32_append
598
+ func Slice_float32_append(handle CGoHandle, _vl C.float) {
599
+ s := ptrFromHandle_Slice_float32(handle)
600
+ *s = append(*s, float32(_vl))
601
+ }
602
+
603
+ // Converters for implicit pointer handles for type: []float64
604
+ func ptrFromHandle_Slice_float64(h CGoHandle) *[]float64 {
605
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]float64")
606
+ if p == nil {
607
+ return nil
608
+ }
609
+ return p.(*[]float64)
610
+ }
611
+ func deptrFromHandle_Slice_float64(h CGoHandle) []float64 {
612
+ p := ptrFromHandle_Slice_float64(h)
613
+ if p == nil {
614
+ return nil
615
+ }
616
+ return *p
617
+ }
618
+ func handleFromPtr_Slice_float64(p interface{}) CGoHandle {
619
+ return CGoHandle(gopyh.Register("[]float64", p))
620
+ }
621
+
622
+ // --- wrapping slice: []float64 ---
623
+ //
624
+ //export Slice_float64_CTor
625
+ func Slice_float64_CTor() CGoHandle {
626
+ return CGoHandle(handleFromPtr_Slice_float64(&[]float64{}))
627
+ }
628
+
629
+ //export Slice_float64_len
630
+ func Slice_float64_len(handle CGoHandle) int {
631
+ return len(deptrFromHandle_Slice_float64(handle))
632
+ }
633
+
634
+ //export Slice_float64_elem
635
+ func Slice_float64_elem(handle CGoHandle, _idx int) C.double {
636
+ s := deptrFromHandle_Slice_float64(handle)
637
+ return C.double(s[_idx])
638
+ }
639
+
640
+ //export Slice_float64_subslice
641
+ func Slice_float64_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
642
+ s := deptrFromHandle_Slice_float64(handle)
643
+ ss := s[_st:_ed]
644
+ return CGoHandle(handleFromPtr_Slice_float64(&ss))
645
+ }
646
+
647
+ //export Slice_float64_set
648
+ func Slice_float64_set(handle CGoHandle, _idx int, _vl C.double) {
649
+ s := deptrFromHandle_Slice_float64(handle)
650
+ s[_idx] = float64(_vl)
651
+ }
652
+
653
+ //export Slice_float64_append
654
+ func Slice_float64_append(handle CGoHandle, _vl C.double) {
655
+ s := ptrFromHandle_Slice_float64(handle)
656
+ *s = append(*s, float64(_vl))
657
+ }
658
+
659
+ // Converters for implicit pointer handles for type: []int
660
+ func ptrFromHandle_Slice_int(h CGoHandle) *[]int {
661
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]int")
662
+ if p == nil {
663
+ return nil
664
+ }
665
+ return p.(*[]int)
666
+ }
667
+ func deptrFromHandle_Slice_int(h CGoHandle) []int {
668
+ p := ptrFromHandle_Slice_int(h)
669
+ if p == nil {
670
+ return nil
671
+ }
672
+ return *p
673
+ }
674
+ func handleFromPtr_Slice_int(p interface{}) CGoHandle {
675
+ return CGoHandle(gopyh.Register("[]int", p))
676
+ }
677
+
678
+ // --- wrapping slice: []int ---
679
+ //
680
+ //export Slice_int_CTor
681
+ func Slice_int_CTor() CGoHandle {
682
+ return CGoHandle(handleFromPtr_Slice_int(&[]int{}))
683
+ }
684
+
685
+ //export Slice_int_len
686
+ func Slice_int_len(handle CGoHandle) int {
687
+ return len(deptrFromHandle_Slice_int(handle))
688
+ }
689
+
690
+ //export Slice_int_elem
691
+ func Slice_int_elem(handle CGoHandle, _idx int) C.longlong {
692
+ s := deptrFromHandle_Slice_int(handle)
693
+ return C.longlong(s[_idx])
694
+ }
695
+
696
+ //export Slice_int_subslice
697
+ func Slice_int_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
698
+ s := deptrFromHandle_Slice_int(handle)
699
+ ss := s[_st:_ed]
700
+ return CGoHandle(handleFromPtr_Slice_int(&ss))
701
+ }
702
+
703
+ //export Slice_int_set
704
+ func Slice_int_set(handle CGoHandle, _idx int, _vl C.longlong) {
705
+ s := deptrFromHandle_Slice_int(handle)
706
+ s[_idx] = int(_vl)
707
+ }
708
+
709
+ //export Slice_int_append
710
+ func Slice_int_append(handle CGoHandle, _vl C.longlong) {
711
+ s := ptrFromHandle_Slice_int(handle)
712
+ *s = append(*s, int(_vl))
713
+ }
714
+
715
+ // Converters for implicit pointer handles for type: []int16
716
+ func ptrFromHandle_Slice_int16(h CGoHandle) *[]int16 {
717
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]int16")
718
+ if p == nil {
719
+ return nil
720
+ }
721
+ return p.(*[]int16)
722
+ }
723
+ func deptrFromHandle_Slice_int16(h CGoHandle) []int16 {
724
+ p := ptrFromHandle_Slice_int16(h)
725
+ if p == nil {
726
+ return nil
727
+ }
728
+ return *p
729
+ }
730
+ func handleFromPtr_Slice_int16(p interface{}) CGoHandle {
731
+ return CGoHandle(gopyh.Register("[]int16", p))
732
+ }
733
+
734
+ // --- wrapping slice: []int16 ---
735
+ //
736
+ //export Slice_int16_CTor
737
+ func Slice_int16_CTor() CGoHandle {
738
+ return CGoHandle(handleFromPtr_Slice_int16(&[]int16{}))
739
+ }
740
+
741
+ //export Slice_int16_len
742
+ func Slice_int16_len(handle CGoHandle) int {
743
+ return len(deptrFromHandle_Slice_int16(handle))
744
+ }
745
+
746
+ //export Slice_int16_elem
747
+ func Slice_int16_elem(handle CGoHandle, _idx int) C.short {
748
+ s := deptrFromHandle_Slice_int16(handle)
749
+ return C.short(s[_idx])
750
+ }
751
+
752
+ //export Slice_int16_subslice
753
+ func Slice_int16_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
754
+ s := deptrFromHandle_Slice_int16(handle)
755
+ ss := s[_st:_ed]
756
+ return CGoHandle(handleFromPtr_Slice_int16(&ss))
757
+ }
758
+
759
+ //export Slice_int16_set
760
+ func Slice_int16_set(handle CGoHandle, _idx int, _vl C.short) {
761
+ s := deptrFromHandle_Slice_int16(handle)
762
+ s[_idx] = int16(_vl)
763
+ }
764
+
765
+ //export Slice_int16_append
766
+ func Slice_int16_append(handle CGoHandle, _vl C.short) {
767
+ s := ptrFromHandle_Slice_int16(handle)
768
+ *s = append(*s, int16(_vl))
769
+ }
770
+
771
+ // Converters for implicit pointer handles for type: []int32
772
+ func ptrFromHandle_Slice_int32(h CGoHandle) *[]int32 {
773
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]int32")
774
+ if p == nil {
775
+ return nil
776
+ }
777
+ return p.(*[]int32)
778
+ }
779
+ func deptrFromHandle_Slice_int32(h CGoHandle) []int32 {
780
+ p := ptrFromHandle_Slice_int32(h)
781
+ if p == nil {
782
+ return nil
783
+ }
784
+ return *p
785
+ }
786
+ func handleFromPtr_Slice_int32(p interface{}) CGoHandle {
787
+ return CGoHandle(gopyh.Register("[]int32", p))
788
+ }
789
+
790
+ // --- wrapping slice: []int32 ---
791
+ //
792
+ //export Slice_int32_CTor
793
+ func Slice_int32_CTor() CGoHandle {
794
+ return CGoHandle(handleFromPtr_Slice_int32(&[]int32{}))
795
+ }
796
+
797
+ //export Slice_int32_len
798
+ func Slice_int32_len(handle CGoHandle) int {
799
+ return len(deptrFromHandle_Slice_int32(handle))
800
+ }
801
+
802
+ //export Slice_int32_elem
803
+ func Slice_int32_elem(handle CGoHandle, _idx int) C.long {
804
+ s := deptrFromHandle_Slice_int32(handle)
805
+ return C.long(s[_idx])
806
+ }
807
+
808
+ //export Slice_int32_subslice
809
+ func Slice_int32_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
810
+ s := deptrFromHandle_Slice_int32(handle)
811
+ ss := s[_st:_ed]
812
+ return CGoHandle(handleFromPtr_Slice_int32(&ss))
813
+ }
814
+
815
+ //export Slice_int32_set
816
+ func Slice_int32_set(handle CGoHandle, _idx int, _vl C.long) {
817
+ s := deptrFromHandle_Slice_int32(handle)
818
+ s[_idx] = int32(_vl)
819
+ }
820
+
821
+ //export Slice_int32_append
822
+ func Slice_int32_append(handle CGoHandle, _vl C.long) {
823
+ s := ptrFromHandle_Slice_int32(handle)
824
+ *s = append(*s, int32(_vl))
825
+ }
826
+
827
+ // Converters for implicit pointer handles for type: []int64
828
+ func ptrFromHandle_Slice_int64(h CGoHandle) *[]int64 {
829
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]int64")
830
+ if p == nil {
831
+ return nil
832
+ }
833
+ return p.(*[]int64)
834
+ }
835
+ func deptrFromHandle_Slice_int64(h CGoHandle) []int64 {
836
+ p := ptrFromHandle_Slice_int64(h)
837
+ if p == nil {
838
+ return nil
839
+ }
840
+ return *p
841
+ }
842
+ func handleFromPtr_Slice_int64(p interface{}) CGoHandle {
843
+ return CGoHandle(gopyh.Register("[]int64", p))
844
+ }
845
+
846
+ // --- wrapping slice: []int64 ---
847
+ //
848
+ //export Slice_int64_CTor
849
+ func Slice_int64_CTor() CGoHandle {
850
+ return CGoHandle(handleFromPtr_Slice_int64(&[]int64{}))
851
+ }
852
+
853
+ //export Slice_int64_len
854
+ func Slice_int64_len(handle CGoHandle) int {
855
+ return len(deptrFromHandle_Slice_int64(handle))
856
+ }
857
+
858
+ //export Slice_int64_elem
859
+ func Slice_int64_elem(handle CGoHandle, _idx int) C.longlong {
860
+ s := deptrFromHandle_Slice_int64(handle)
861
+ return C.longlong(s[_idx])
862
+ }
863
+
864
+ //export Slice_int64_subslice
865
+ func Slice_int64_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
866
+ s := deptrFromHandle_Slice_int64(handle)
867
+ ss := s[_st:_ed]
868
+ return CGoHandle(handleFromPtr_Slice_int64(&ss))
869
+ }
870
+
871
+ //export Slice_int64_set
872
+ func Slice_int64_set(handle CGoHandle, _idx int, _vl C.longlong) {
873
+ s := deptrFromHandle_Slice_int64(handle)
874
+ s[_idx] = int64(_vl)
875
+ }
876
+
877
+ //export Slice_int64_append
878
+ func Slice_int64_append(handle CGoHandle, _vl C.longlong) {
879
+ s := ptrFromHandle_Slice_int64(handle)
880
+ *s = append(*s, int64(_vl))
881
+ }
882
+
883
+ // Converters for implicit pointer handles for type: []int8
884
+ func ptrFromHandle_Slice_int8(h CGoHandle) *[]int8 {
885
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]int8")
886
+ if p == nil {
887
+ return nil
888
+ }
889
+ return p.(*[]int8)
890
+ }
891
+ func deptrFromHandle_Slice_int8(h CGoHandle) []int8 {
892
+ p := ptrFromHandle_Slice_int8(h)
893
+ if p == nil {
894
+ return nil
895
+ }
896
+ return *p
897
+ }
898
+ func handleFromPtr_Slice_int8(p interface{}) CGoHandle {
899
+ return CGoHandle(gopyh.Register("[]int8", p))
900
+ }
901
+
902
+ // --- wrapping slice: []int8 ---
903
+ //
904
+ //export Slice_int8_CTor
905
+ func Slice_int8_CTor() CGoHandle {
906
+ return CGoHandle(handleFromPtr_Slice_int8(&[]int8{}))
907
+ }
908
+
909
+ //export Slice_int8_len
910
+ func Slice_int8_len(handle CGoHandle) int {
911
+ return len(deptrFromHandle_Slice_int8(handle))
912
+ }
913
+
914
+ //export Slice_int8_elem
915
+ func Slice_int8_elem(handle CGoHandle, _idx int) C.char {
916
+ s := deptrFromHandle_Slice_int8(handle)
917
+ return C.char(s[_idx])
918
+ }
919
+
920
+ //export Slice_int8_subslice
921
+ func Slice_int8_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
922
+ s := deptrFromHandle_Slice_int8(handle)
923
+ ss := s[_st:_ed]
924
+ return CGoHandle(handleFromPtr_Slice_int8(&ss))
925
+ }
926
+
927
+ //export Slice_int8_set
928
+ func Slice_int8_set(handle CGoHandle, _idx int, _vl C.char) {
929
+ s := deptrFromHandle_Slice_int8(handle)
930
+ s[_idx] = int8(_vl)
931
+ }
932
+
933
+ //export Slice_int8_append
934
+ func Slice_int8_append(handle CGoHandle, _vl C.char) {
935
+ s := ptrFromHandle_Slice_int8(handle)
936
+ *s = append(*s, int8(_vl))
937
+ }
938
+
939
+ // Converters for implicit pointer handles for type: []rune
940
+ func ptrFromHandle_Slice_rune(h CGoHandle) *[]rune {
941
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]rune")
942
+ if p == nil {
943
+ return nil
944
+ }
945
+ return p.(*[]rune)
946
+ }
947
+ func deptrFromHandle_Slice_rune(h CGoHandle) []rune {
948
+ p := ptrFromHandle_Slice_rune(h)
949
+ if p == nil {
950
+ return nil
951
+ }
952
+ return *p
953
+ }
954
+ func handleFromPtr_Slice_rune(p interface{}) CGoHandle {
955
+ return CGoHandle(gopyh.Register("[]rune", p))
956
+ }
957
+
958
+ // --- wrapping slice: []rune ---
959
+ //
960
+ //export Slice_rune_CTor
961
+ func Slice_rune_CTor() CGoHandle {
962
+ return CGoHandle(handleFromPtr_Slice_rune(&[]rune{}))
963
+ }
964
+
965
+ //export Slice_rune_len
966
+ func Slice_rune_len(handle CGoHandle) int {
967
+ return len(deptrFromHandle_Slice_rune(handle))
968
+ }
969
+
970
+ //export Slice_rune_elem
971
+ func Slice_rune_elem(handle CGoHandle, _idx int) C.long {
972
+ s := deptrFromHandle_Slice_rune(handle)
973
+ return C.long(s[_idx])
974
+ }
975
+
976
+ //export Slice_rune_subslice
977
+ func Slice_rune_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
978
+ s := deptrFromHandle_Slice_rune(handle)
979
+ ss := s[_st:_ed]
980
+ return CGoHandle(handleFromPtr_Slice_rune(&ss))
981
+ }
982
+
983
+ //export Slice_rune_set
984
+ func Slice_rune_set(handle CGoHandle, _idx int, _vl C.long) {
985
+ s := deptrFromHandle_Slice_rune(handle)
986
+ s[_idx] = rune(_vl)
987
+ }
988
+
989
+ //export Slice_rune_append
990
+ func Slice_rune_append(handle CGoHandle, _vl C.long) {
991
+ s := ptrFromHandle_Slice_rune(handle)
992
+ *s = append(*s, rune(_vl))
993
+ }
994
+
995
+ // Converters for implicit pointer handles for type: []string
996
+ func ptrFromHandle_Slice_string(h CGoHandle) *[]string {
997
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]string")
998
+ if p == nil {
999
+ return nil
1000
+ }
1001
+ return p.(*[]string)
1002
+ }
1003
+ func deptrFromHandle_Slice_string(h CGoHandle) []string {
1004
+ p := ptrFromHandle_Slice_string(h)
1005
+ if p == nil {
1006
+ return nil
1007
+ }
1008
+ return *p
1009
+ }
1010
+ func handleFromPtr_Slice_string(p interface{}) CGoHandle {
1011
+ return CGoHandle(gopyh.Register("[]string", p))
1012
+ }
1013
+
1014
+ // --- wrapping slice: []string ---
1015
+ //
1016
+ //export Slice_string_CTor
1017
+ func Slice_string_CTor() CGoHandle {
1018
+ return CGoHandle(handleFromPtr_Slice_string(&[]string{}))
1019
+ }
1020
+
1021
+ //export Slice_string_len
1022
+ func Slice_string_len(handle CGoHandle) int {
1023
+ return len(deptrFromHandle_Slice_string(handle))
1024
+ }
1025
+
1026
+ //export Slice_string_elem
1027
+ func Slice_string_elem(handle CGoHandle, _idx int) *C.char {
1028
+ s := deptrFromHandle_Slice_string(handle)
1029
+ return C.CString(s[_idx])
1030
+ }
1031
+
1032
+ //export Slice_string_subslice
1033
+ func Slice_string_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
1034
+ s := deptrFromHandle_Slice_string(handle)
1035
+ ss := s[_st:_ed]
1036
+ return CGoHandle(handleFromPtr_Slice_string(&ss))
1037
+ }
1038
+
1039
+ //export Slice_string_set
1040
+ func Slice_string_set(handle CGoHandle, _idx int, _vl *C.char) {
1041
+ s := deptrFromHandle_Slice_string(handle)
1042
+ s[_idx] = C.GoString(_vl)
1043
+ }
1044
+
1045
+ //export Slice_string_append
1046
+ func Slice_string_append(handle CGoHandle, _vl *C.char) {
1047
+ s := ptrFromHandle_Slice_string(handle)
1048
+ *s = append(*s, C.GoString(_vl))
1049
+ }
1050
+
1051
+ // Converters for implicit pointer handles for type: []uint
1052
+ func ptrFromHandle_Slice_uint(h CGoHandle) *[]uint {
1053
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]uint")
1054
+ if p == nil {
1055
+ return nil
1056
+ }
1057
+ return p.(*[]uint)
1058
+ }
1059
+ func deptrFromHandle_Slice_uint(h CGoHandle) []uint {
1060
+ p := ptrFromHandle_Slice_uint(h)
1061
+ if p == nil {
1062
+ return nil
1063
+ }
1064
+ return *p
1065
+ }
1066
+ func handleFromPtr_Slice_uint(p interface{}) CGoHandle {
1067
+ return CGoHandle(gopyh.Register("[]uint", p))
1068
+ }
1069
+
1070
+ // --- wrapping slice: []uint ---
1071
+ //
1072
+ //export Slice_uint_CTor
1073
+ func Slice_uint_CTor() CGoHandle {
1074
+ return CGoHandle(handleFromPtr_Slice_uint(&[]uint{}))
1075
+ }
1076
+
1077
+ //export Slice_uint_len
1078
+ func Slice_uint_len(handle CGoHandle) int {
1079
+ return len(deptrFromHandle_Slice_uint(handle))
1080
+ }
1081
+
1082
+ //export Slice_uint_elem
1083
+ func Slice_uint_elem(handle CGoHandle, _idx int) C.ulonglong {
1084
+ s := deptrFromHandle_Slice_uint(handle)
1085
+ return C.ulonglong(s[_idx])
1086
+ }
1087
+
1088
+ //export Slice_uint_subslice
1089
+ func Slice_uint_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
1090
+ s := deptrFromHandle_Slice_uint(handle)
1091
+ ss := s[_st:_ed]
1092
+ return CGoHandle(handleFromPtr_Slice_uint(&ss))
1093
+ }
1094
+
1095
+ //export Slice_uint_set
1096
+ func Slice_uint_set(handle CGoHandle, _idx int, _vl C.ulonglong) {
1097
+ s := deptrFromHandle_Slice_uint(handle)
1098
+ s[_idx] = uint(_vl)
1099
+ }
1100
+
1101
+ //export Slice_uint_append
1102
+ func Slice_uint_append(handle CGoHandle, _vl C.ulonglong) {
1103
+ s := ptrFromHandle_Slice_uint(handle)
1104
+ *s = append(*s, uint(_vl))
1105
+ }
1106
+
1107
+ // Converters for implicit pointer handles for type: []uint16
1108
+ func ptrFromHandle_Slice_uint16(h CGoHandle) *[]uint16 {
1109
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]uint16")
1110
+ if p == nil {
1111
+ return nil
1112
+ }
1113
+ return p.(*[]uint16)
1114
+ }
1115
+ func deptrFromHandle_Slice_uint16(h CGoHandle) []uint16 {
1116
+ p := ptrFromHandle_Slice_uint16(h)
1117
+ if p == nil {
1118
+ return nil
1119
+ }
1120
+ return *p
1121
+ }
1122
+ func handleFromPtr_Slice_uint16(p interface{}) CGoHandle {
1123
+ return CGoHandle(gopyh.Register("[]uint16", p))
1124
+ }
1125
+
1126
+ // --- wrapping slice: []uint16 ---
1127
+ //
1128
+ //export Slice_uint16_CTor
1129
+ func Slice_uint16_CTor() CGoHandle {
1130
+ return CGoHandle(handleFromPtr_Slice_uint16(&[]uint16{}))
1131
+ }
1132
+
1133
+ //export Slice_uint16_len
1134
+ func Slice_uint16_len(handle CGoHandle) int {
1135
+ return len(deptrFromHandle_Slice_uint16(handle))
1136
+ }
1137
+
1138
+ //export Slice_uint16_elem
1139
+ func Slice_uint16_elem(handle CGoHandle, _idx int) C.ushort {
1140
+ s := deptrFromHandle_Slice_uint16(handle)
1141
+ return C.ushort(s[_idx])
1142
+ }
1143
+
1144
+ //export Slice_uint16_subslice
1145
+ func Slice_uint16_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
1146
+ s := deptrFromHandle_Slice_uint16(handle)
1147
+ ss := s[_st:_ed]
1148
+ return CGoHandle(handleFromPtr_Slice_uint16(&ss))
1149
+ }
1150
+
1151
+ //export Slice_uint16_set
1152
+ func Slice_uint16_set(handle CGoHandle, _idx int, _vl C.ushort) {
1153
+ s := deptrFromHandle_Slice_uint16(handle)
1154
+ s[_idx] = uint16(_vl)
1155
+ }
1156
+
1157
+ //export Slice_uint16_append
1158
+ func Slice_uint16_append(handle CGoHandle, _vl C.ushort) {
1159
+ s := ptrFromHandle_Slice_uint16(handle)
1160
+ *s = append(*s, uint16(_vl))
1161
+ }
1162
+
1163
+ // Converters for implicit pointer handles for type: []uint32
1164
+ func ptrFromHandle_Slice_uint32(h CGoHandle) *[]uint32 {
1165
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]uint32")
1166
+ if p == nil {
1167
+ return nil
1168
+ }
1169
+ return p.(*[]uint32)
1170
+ }
1171
+ func deptrFromHandle_Slice_uint32(h CGoHandle) []uint32 {
1172
+ p := ptrFromHandle_Slice_uint32(h)
1173
+ if p == nil {
1174
+ return nil
1175
+ }
1176
+ return *p
1177
+ }
1178
+ func handleFromPtr_Slice_uint32(p interface{}) CGoHandle {
1179
+ return CGoHandle(gopyh.Register("[]uint32", p))
1180
+ }
1181
+
1182
+ // --- wrapping slice: []uint32 ---
1183
+ //
1184
+ //export Slice_uint32_CTor
1185
+ func Slice_uint32_CTor() CGoHandle {
1186
+ return CGoHandle(handleFromPtr_Slice_uint32(&[]uint32{}))
1187
+ }
1188
+
1189
+ //export Slice_uint32_len
1190
+ func Slice_uint32_len(handle CGoHandle) int {
1191
+ return len(deptrFromHandle_Slice_uint32(handle))
1192
+ }
1193
+
1194
+ //export Slice_uint32_elem
1195
+ func Slice_uint32_elem(handle CGoHandle, _idx int) C.ulong {
1196
+ s := deptrFromHandle_Slice_uint32(handle)
1197
+ return C.ulong(s[_idx])
1198
+ }
1199
+
1200
+ //export Slice_uint32_subslice
1201
+ func Slice_uint32_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
1202
+ s := deptrFromHandle_Slice_uint32(handle)
1203
+ ss := s[_st:_ed]
1204
+ return CGoHandle(handleFromPtr_Slice_uint32(&ss))
1205
+ }
1206
+
1207
+ //export Slice_uint32_set
1208
+ func Slice_uint32_set(handle CGoHandle, _idx int, _vl C.ulong) {
1209
+ s := deptrFromHandle_Slice_uint32(handle)
1210
+ s[_idx] = uint32(_vl)
1211
+ }
1212
+
1213
+ //export Slice_uint32_append
1214
+ func Slice_uint32_append(handle CGoHandle, _vl C.ulong) {
1215
+ s := ptrFromHandle_Slice_uint32(handle)
1216
+ *s = append(*s, uint32(_vl))
1217
+ }
1218
+
1219
+ // Converters for implicit pointer handles for type: []uint64
1220
+ func ptrFromHandle_Slice_uint64(h CGoHandle) *[]uint64 {
1221
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]uint64")
1222
+ if p == nil {
1223
+ return nil
1224
+ }
1225
+ return p.(*[]uint64)
1226
+ }
1227
+ func deptrFromHandle_Slice_uint64(h CGoHandle) []uint64 {
1228
+ p := ptrFromHandle_Slice_uint64(h)
1229
+ if p == nil {
1230
+ return nil
1231
+ }
1232
+ return *p
1233
+ }
1234
+ func handleFromPtr_Slice_uint64(p interface{}) CGoHandle {
1235
+ return CGoHandle(gopyh.Register("[]uint64", p))
1236
+ }
1237
+
1238
+ // --- wrapping slice: []uint64 ---
1239
+ //
1240
+ //export Slice_uint64_CTor
1241
+ func Slice_uint64_CTor() CGoHandle {
1242
+ return CGoHandle(handleFromPtr_Slice_uint64(&[]uint64{}))
1243
+ }
1244
+
1245
+ //export Slice_uint64_len
1246
+ func Slice_uint64_len(handle CGoHandle) int {
1247
+ return len(deptrFromHandle_Slice_uint64(handle))
1248
+ }
1249
+
1250
+ //export Slice_uint64_elem
1251
+ func Slice_uint64_elem(handle CGoHandle, _idx int) C.ulonglong {
1252
+ s := deptrFromHandle_Slice_uint64(handle)
1253
+ return C.ulonglong(s[_idx])
1254
+ }
1255
+
1256
+ //export Slice_uint64_subslice
1257
+ func Slice_uint64_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
1258
+ s := deptrFromHandle_Slice_uint64(handle)
1259
+ ss := s[_st:_ed]
1260
+ return CGoHandle(handleFromPtr_Slice_uint64(&ss))
1261
+ }
1262
+
1263
+ //export Slice_uint64_set
1264
+ func Slice_uint64_set(handle CGoHandle, _idx int, _vl C.ulonglong) {
1265
+ s := deptrFromHandle_Slice_uint64(handle)
1266
+ s[_idx] = uint64(_vl)
1267
+ }
1268
+
1269
+ //export Slice_uint64_append
1270
+ func Slice_uint64_append(handle CGoHandle, _vl C.ulonglong) {
1271
+ s := ptrFromHandle_Slice_uint64(handle)
1272
+ *s = append(*s, uint64(_vl))
1273
+ }
1274
+
1275
+ // Converters for implicit pointer handles for type: []uint8
1276
+ func ptrFromHandle_Slice_uint8(h CGoHandle) *[]uint8 {
1277
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]uint8")
1278
+ if p == nil {
1279
+ return nil
1280
+ }
1281
+ return p.(*[]uint8)
1282
+ }
1283
+ func deptrFromHandle_Slice_uint8(h CGoHandle) []uint8 {
1284
+ p := ptrFromHandle_Slice_uint8(h)
1285
+ if p == nil {
1286
+ return nil
1287
+ }
1288
+ return *p
1289
+ }
1290
+ func handleFromPtr_Slice_uint8(p interface{}) CGoHandle {
1291
+ return CGoHandle(gopyh.Register("[]uint8", p))
1292
+ }
1293
+
1294
+ // --- wrapping slice: []uint8 ---
1295
+ //
1296
+ //export Slice_uint8_CTor
1297
+ func Slice_uint8_CTor() CGoHandle {
1298
+ return CGoHandle(handleFromPtr_Slice_uint8(&[]uint8{}))
1299
+ }
1300
+
1301
+ //export Slice_uint8_len
1302
+ func Slice_uint8_len(handle CGoHandle) int {
1303
+ return len(deptrFromHandle_Slice_uint8(handle))
1304
+ }
1305
+
1306
+ //export Slice_uint8_elem
1307
+ func Slice_uint8_elem(handle CGoHandle, _idx int) C.uchar {
1308
+ s := deptrFromHandle_Slice_uint8(handle)
1309
+ return C.uchar(s[_idx])
1310
+ }
1311
+
1312
+ //export Slice_uint8_subslice
1313
+ func Slice_uint8_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
1314
+ s := deptrFromHandle_Slice_uint8(handle)
1315
+ ss := s[_st:_ed]
1316
+ return CGoHandle(handleFromPtr_Slice_uint8(&ss))
1317
+ }
1318
+
1319
+ //export Slice_uint8_set
1320
+ func Slice_uint8_set(handle CGoHandle, _idx int, _vl C.uchar) {
1321
+ s := deptrFromHandle_Slice_uint8(handle)
1322
+ s[_idx] = uint8(_vl)
1323
+ }
1324
+
1325
+ //export Slice_uint8_append
1326
+ func Slice_uint8_append(handle CGoHandle, _vl C.uchar) {
1327
+ s := ptrFromHandle_Slice_uint8(handle)
1328
+ *s = append(*s, uint8(_vl))
1329
+ }
1330
+
1331
+ // ---- Package: api ---
1332
+
1333
+ // ---- Types ---
1334
+
1335
+ // Converters for pointer handles for type: *api.ClassDefinition
1336
+ func ptrFromHandle_Ptr_api_ClassDefinition(h CGoHandle) *api.ClassDefinition {
1337
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*api.ClassDefinition")
1338
+ if p == nil {
1339
+ return nil
1340
+ }
1341
+ return gopyh.Embed(p, reflect.TypeOf(api.ClassDefinition{})).(*api.ClassDefinition)
1342
+ }
1343
+ func handleFromPtr_Ptr_api_ClassDefinition(p interface{}) CGoHandle {
1344
+ return CGoHandle(gopyh.Register("*api.ClassDefinition", p))
1345
+ }
1346
+
1347
+ // Converters for pointer handles for type: *api.ClassMethod
1348
+ func ptrFromHandle_Ptr_api_ClassMethod(h CGoHandle) *api.ClassMethod {
1349
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*api.ClassMethod")
1350
+ if p == nil {
1351
+ return nil
1352
+ }
1353
+ return gopyh.Embed(p, reflect.TypeOf(api.ClassMethod{})).(*api.ClassMethod)
1354
+ }
1355
+ func handleFromPtr_Ptr_api_ClassMethod(p interface{}) CGoHandle {
1356
+ return CGoHandle(gopyh.Register("*api.ClassMethod", p))
1357
+ }
1358
+
1359
+ // Converters for pointer handles for type: *api.ClassVariable
1360
+ func ptrFromHandle_Ptr_api_ClassVariable(h CGoHandle) *api.ClassVariable {
1361
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*api.ClassVariable")
1362
+ if p == nil {
1363
+ return nil
1364
+ }
1365
+ return gopyh.Embed(p, reflect.TypeOf(api.ClassVariable{})).(*api.ClassVariable)
1366
+ }
1367
+ func handleFromPtr_Ptr_api_ClassVariable(p interface{}) CGoHandle {
1368
+ return CGoHandle(gopyh.Register("*api.ClassVariable", p))
1369
+ }
1370
+
1371
+ // Converters for pointer handles for type: *api.ExecutionResult
1372
+ func ptrFromHandle_Ptr_api_ExecutionResult(h CGoHandle) *api.ExecutionResult {
1373
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*api.ExecutionResult")
1374
+ if p == nil {
1375
+ return nil
1376
+ }
1377
+ return gopyh.Embed(p, reflect.TypeOf(api.ExecutionResult{})).(*api.ExecutionResult)
1378
+ }
1379
+ func handleFromPtr_Ptr_api_ExecutionResult(p interface{}) CGoHandle {
1380
+ return CGoHandle(gopyh.Register("*api.ExecutionResult", p))
1381
+ }
1382
+
1383
+ // Converters for pointer handles for type: *api.GoValue
1384
+ func ptrFromHandle_Ptr_api_GoValue(h CGoHandle) *api.GoValue {
1385
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*api.GoValue")
1386
+ if p == nil {
1387
+ return nil
1388
+ }
1389
+ return gopyh.Embed(p, reflect.TypeOf(api.GoValue{})).(*api.GoValue)
1390
+ }
1391
+ func handleFromPtr_Ptr_api_GoValue(p interface{}) CGoHandle {
1392
+ return CGoHandle(gopyh.Register("*api.GoValue", p))
1393
+ }
1394
+
1395
+ // Converters for pointer handles for type: *api.SourceLocation
1396
+ func ptrFromHandle_Ptr_api_SourceLocation(h CGoHandle) *api.SourceLocation {
1397
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*api.SourceLocation")
1398
+ if p == nil {
1399
+ return nil
1400
+ }
1401
+ return gopyh.Embed(p, reflect.TypeOf(api.SourceLocation{})).(*api.SourceLocation)
1402
+ }
1403
+ func handleFromPtr_Ptr_api_SourceLocation(p interface{}) CGoHandle {
1404
+ return CGoHandle(gopyh.Register("*api.SourceLocation", p))
1405
+ }
1406
+
1407
+ // Converters for pointer handles for type: *api.UnknownFunctionHandler
1408
+ func ptrFromHandle_Ptr_api_UnknownFunctionHandler(h CGoHandle) *api.UnknownFunctionHandler {
1409
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*api.UnknownFunctionHandler")
1410
+ if p == nil {
1411
+ return nil
1412
+ }
1413
+ return gopyh.Embed(p, reflect.TypeOf(api.UnknownFunctionHandler{})).(*api.UnknownFunctionHandler)
1414
+ }
1415
+ func handleFromPtr_Ptr_api_UnknownFunctionHandler(p interface{}) CGoHandle {
1416
+ return CGoHandle(gopyh.Register("*api.UnknownFunctionHandler", p))
1417
+ }
1418
+
1419
+ // Converters for pointer handles for type: *api.VM
1420
+ func ptrFromHandle_Ptr_api_VM(h CGoHandle) *api.VM {
1421
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*api.VM")
1422
+ if p == nil {
1423
+ return nil
1424
+ }
1425
+ return gopyh.Embed(p, reflect.TypeOf(api.VM{})).(*api.VM)
1426
+ }
1427
+ func handleFromPtr_Ptr_api_VM(p interface{}) CGoHandle {
1428
+ return CGoHandle(gopyh.Register("*api.VM", p))
1429
+ }
1430
+
1431
+ // Converters for pointer handles for type: *api.VMCompatibilityShim
1432
+ func ptrFromHandle_Ptr_api_VMCompatibilityShim(h CGoHandle) *api.VMCompatibilityShim {
1433
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*api.VMCompatibilityShim")
1434
+ if p == nil {
1435
+ return nil
1436
+ }
1437
+ return gopyh.Embed(p, reflect.TypeOf(api.VMCompatibilityShim{})).(*api.VMCompatibilityShim)
1438
+ }
1439
+ func handleFromPtr_Ptr_api_VMCompatibilityShim(p interface{}) CGoHandle {
1440
+ return CGoHandle(gopyh.Register("*api.VMCompatibilityShim", p))
1441
+ }
1442
+
1443
+ // Converters for pointer handles for type: *api.VMConfig
1444
+ func ptrFromHandle_Ptr_api_VMConfig(h CGoHandle) *api.VMConfig {
1445
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*api.VMConfig")
1446
+ if p == nil {
1447
+ return nil
1448
+ }
1449
+ return gopyh.Embed(p, reflect.TypeOf(api.VMConfig{})).(*api.VMConfig)
1450
+ }
1451
+ func handleFromPtr_Ptr_api_VMConfig(p interface{}) CGoHandle {
1452
+ return CGoHandle(gopyh.Register("*api.VMConfig", p))
1453
+ }
1454
+
1455
+ // Converters for pointer handles for type: *api.VMError
1456
+ func ptrFromHandle_Ptr_api_VMError(h CGoHandle) *api.VMError {
1457
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*api.VMError")
1458
+ if p == nil {
1459
+ return nil
1460
+ }
1461
+ return gopyh.Embed(p, reflect.TypeOf(api.VMError{})).(*api.VMError)
1462
+ }
1463
+ func handleFromPtr_Ptr_api_VMError(p interface{}) CGoHandle {
1464
+ return CGoHandle(gopyh.Register("*api.VMError", p))
1465
+ }
1466
+
1467
+ // Converters for implicit pointer handles for type: []api.GoValue
1468
+ func ptrFromHandle_Slice_api_GoValue(h CGoHandle) *[]api.GoValue {
1469
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]api.GoValue")
1470
+ if p == nil {
1471
+ return nil
1472
+ }
1473
+ return p.(*[]api.GoValue)
1474
+ }
1475
+ func deptrFromHandle_Slice_api_GoValue(h CGoHandle) []api.GoValue {
1476
+ p := ptrFromHandle_Slice_api_GoValue(h)
1477
+ if p == nil {
1478
+ return nil
1479
+ }
1480
+ return *p
1481
+ }
1482
+ func handleFromPtr_Slice_api_GoValue(p interface{}) CGoHandle {
1483
+ return CGoHandle(gopyh.Register("[]api.GoValue", p))
1484
+ }
1485
+
1486
+ // --- wrapping slice: []api.GoValue ---
1487
+ //
1488
+ //export Slice_api_GoValue_CTor
1489
+ func Slice_api_GoValue_CTor() CGoHandle {
1490
+ return CGoHandle(handleFromPtr_Slice_api_GoValue(&[]api.GoValue{}))
1491
+ }
1492
+
1493
+ //export Slice_api_GoValue_len
1494
+ func Slice_api_GoValue_len(handle CGoHandle) int {
1495
+ return len(deptrFromHandle_Slice_api_GoValue(handle))
1496
+ }
1497
+
1498
+ //export Slice_api_GoValue_elem
1499
+ func Slice_api_GoValue_elem(handle CGoHandle, _idx int) CGoHandle {
1500
+ s := deptrFromHandle_Slice_api_GoValue(handle)
1501
+ return handleFromPtr_api_GoValue(&(s[_idx]))
1502
+ }
1503
+
1504
+ //export Slice_api_GoValue_subslice
1505
+ func Slice_api_GoValue_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
1506
+ s := deptrFromHandle_Slice_api_GoValue(handle)
1507
+ ss := s[_st:_ed]
1508
+ return CGoHandle(handleFromPtr_Slice_api_GoValue(&ss))
1509
+ }
1510
+
1511
+ //export Slice_api_GoValue_set
1512
+ func Slice_api_GoValue_set(handle CGoHandle, _idx int, _vl CGoHandle) {
1513
+ s := deptrFromHandle_Slice_api_GoValue(handle)
1514
+ s[_idx] = *ptrFromHandle_api_GoValue(_vl)
1515
+ }
1516
+
1517
+ //export Slice_api_GoValue_append
1518
+ func Slice_api_GoValue_append(handle CGoHandle, _vl CGoHandle) {
1519
+ s := ptrFromHandle_Slice_api_GoValue(handle)
1520
+ *s = append(*s, *ptrFromHandle_api_GoValue(_vl))
1521
+ }
1522
+
1523
+ // Converters for implicit pointer handles for type: []environment.Parameter
1524
+ func ptrFromHandle_Slice_environment_Parameter(h CGoHandle) *[]environment.Parameter {
1525
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]environment.Parameter")
1526
+ if p == nil {
1527
+ return nil
1528
+ }
1529
+ return p.(*[]environment.Parameter)
1530
+ }
1531
+ func deptrFromHandle_Slice_environment_Parameter(h CGoHandle) []environment.Parameter {
1532
+ p := ptrFromHandle_Slice_environment_Parameter(h)
1533
+ if p == nil {
1534
+ return nil
1535
+ }
1536
+ return *p
1537
+ }
1538
+ func handleFromPtr_Slice_environment_Parameter(p interface{}) CGoHandle {
1539
+ return CGoHandle(gopyh.Register("[]environment.Parameter", p))
1540
+ }
1541
+
1542
+ // --- wrapping slice: []environment.Parameter ---
1543
+ //
1544
+ //export Slice_environment_Parameter_CTor
1545
+ func Slice_environment_Parameter_CTor() CGoHandle {
1546
+ return CGoHandle(handleFromPtr_Slice_environment_Parameter(&[]environment.Parameter{}))
1547
+ }
1548
+
1549
+ //export Slice_environment_Parameter_len
1550
+ func Slice_environment_Parameter_len(handle CGoHandle) int {
1551
+ return len(deptrFromHandle_Slice_environment_Parameter(handle))
1552
+ }
1553
+
1554
+ //export Slice_environment_Parameter_elem
1555
+ func Slice_environment_Parameter_elem(handle CGoHandle, _idx int) CGoHandle {
1556
+ s := deptrFromHandle_Slice_environment_Parameter(handle)
1557
+ return handleFromPtr_environment_Parameter(&(s[_idx]))
1558
+ }
1559
+
1560
+ //export Slice_environment_Parameter_subslice
1561
+ func Slice_environment_Parameter_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
1562
+ s := deptrFromHandle_Slice_environment_Parameter(handle)
1563
+ ss := s[_st:_ed]
1564
+ return CGoHandle(handleFromPtr_Slice_environment_Parameter(&ss))
1565
+ }
1566
+
1567
+ //export Slice_environment_Parameter_set
1568
+ func Slice_environment_Parameter_set(handle CGoHandle, _idx int, _vl CGoHandle) {
1569
+ s := deptrFromHandle_Slice_environment_Parameter(handle)
1570
+ s[_idx] = *ptrFromHandle_environment_Parameter(_vl)
1571
+ }
1572
+
1573
+ //export Slice_environment_Parameter_append
1574
+ func Slice_environment_Parameter_append(handle CGoHandle, _vl CGoHandle) {
1575
+ s := ptrFromHandle_Slice_environment_Parameter(handle)
1576
+ *s = append(*s, *ptrFromHandle_environment_Parameter(_vl))
1577
+ }
1578
+
1579
+ // Converters for implicit pointer handles for type: []environment.Value
1580
+ func ptrFromHandle_Slice_environment_Value(h CGoHandle) *[]environment.Value {
1581
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]environment.Value")
1582
+ if p == nil {
1583
+ return nil
1584
+ }
1585
+ return p.(*[]environment.Value)
1586
+ }
1587
+ func deptrFromHandle_Slice_environment_Value(h CGoHandle) []environment.Value {
1588
+ p := ptrFromHandle_Slice_environment_Value(h)
1589
+ if p == nil {
1590
+ return nil
1591
+ }
1592
+ return *p
1593
+ }
1594
+ func handleFromPtr_Slice_environment_Value(p interface{}) CGoHandle {
1595
+ return CGoHandle(gopyh.Register("[]environment.Value", p))
1596
+ }
1597
+
1598
+ // --- wrapping slice: []environment.Value ---
1599
+ //
1600
+ //export Slice_environment_Value_CTor
1601
+ func Slice_environment_Value_CTor() CGoHandle {
1602
+ return CGoHandle(handleFromPtr_Slice_environment_Value(&[]environment.Value{}))
1603
+ }
1604
+
1605
+ //export Slice_environment_Value_len
1606
+ func Slice_environment_Value_len(handle CGoHandle) int {
1607
+ return len(deptrFromHandle_Slice_environment_Value(handle))
1608
+ }
1609
+
1610
+ //export Slice_environment_Value_elem
1611
+ func Slice_environment_Value_elem(handle CGoHandle, _idx int) CGoHandle {
1612
+ s := deptrFromHandle_Slice_environment_Value(handle)
1613
+ return handleFromPtr_environment_Value(&(s[_idx]))
1614
+ }
1615
+
1616
+ //export Slice_environment_Value_subslice
1617
+ func Slice_environment_Value_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
1618
+ s := deptrFromHandle_Slice_environment_Value(handle)
1619
+ ss := s[_st:_ed]
1620
+ return CGoHandle(handleFromPtr_Slice_environment_Value(&ss))
1621
+ }
1622
+
1623
+ //export Slice_environment_Value_set
1624
+ func Slice_environment_Value_set(handle CGoHandle, _idx int, _vl CGoHandle) {
1625
+ s := deptrFromHandle_Slice_environment_Value(handle)
1626
+ s[_idx] = ptrFromHandle_environment_Value(_vl)
1627
+ }
1628
+
1629
+ //export Slice_environment_Value_append
1630
+ func Slice_environment_Value_append(handle CGoHandle, _vl CGoHandle) {
1631
+ s := ptrFromHandle_Slice_environment_Value(handle)
1632
+ *s = append(*s, ptrFromHandle_environment_Value(_vl))
1633
+ }
1634
+
1635
+ // Converters for pointer handles for type: any
1636
+ func ptrFromHandle_any(h CGoHandle) any {
1637
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "any")
1638
+ if p == nil {
1639
+ return nil
1640
+ }
1641
+ return p.(any)
1642
+ }
1643
+ func handleFromPtr_any(p interface{}) CGoHandle {
1644
+ return CGoHandle(gopyh.Register("any", p))
1645
+ }
1646
+
1647
+ // Converters for non-pointer handles for type: api.ClassDefinition
1648
+ func ptrFromHandle_api_ClassDefinition(h CGoHandle) *api.ClassDefinition {
1649
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "api.ClassDefinition")
1650
+ if p == nil {
1651
+ return nil
1652
+ }
1653
+ return gopyh.Embed(p, reflect.TypeOf(api.ClassDefinition{})).(*api.ClassDefinition)
1654
+ }
1655
+ func handleFromPtr_api_ClassDefinition(p interface{}) CGoHandle {
1656
+ return CGoHandle(gopyh.Register("api.ClassDefinition", p))
1657
+ }
1658
+
1659
+ // Converters for non-pointer handles for type: api.ClassMethod
1660
+ func ptrFromHandle_api_ClassMethod(h CGoHandle) *api.ClassMethod {
1661
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "api.ClassMethod")
1662
+ if p == nil {
1663
+ return nil
1664
+ }
1665
+ return gopyh.Embed(p, reflect.TypeOf(api.ClassMethod{})).(*api.ClassMethod)
1666
+ }
1667
+ func handleFromPtr_api_ClassMethod(p interface{}) CGoHandle {
1668
+ return CGoHandle(gopyh.Register("api.ClassMethod", p))
1669
+ }
1670
+
1671
+ // Converters for non-pointer handles for type: api.ClassVariable
1672
+ func ptrFromHandle_api_ClassVariable(h CGoHandle) *api.ClassVariable {
1673
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "api.ClassVariable")
1674
+ if p == nil {
1675
+ return nil
1676
+ }
1677
+ return gopyh.Embed(p, reflect.TypeOf(api.ClassVariable{})).(*api.ClassVariable)
1678
+ }
1679
+ func handleFromPtr_api_ClassVariable(p interface{}) CGoHandle {
1680
+ return CGoHandle(gopyh.Register("api.ClassVariable", p))
1681
+ }
1682
+
1683
+ // Converters for non-pointer handles for type: api.ExecutionResult
1684
+ func ptrFromHandle_api_ExecutionResult(h CGoHandle) *api.ExecutionResult {
1685
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "api.ExecutionResult")
1686
+ if p == nil {
1687
+ return nil
1688
+ }
1689
+ return gopyh.Embed(p, reflect.TypeOf(api.ExecutionResult{})).(*api.ExecutionResult)
1690
+ }
1691
+ func handleFromPtr_api_ExecutionResult(p interface{}) CGoHandle {
1692
+ return CGoHandle(gopyh.Register("api.ExecutionResult", p))
1693
+ }
1694
+
1695
+ // Converters for non-pointer handles for type: api.GoValue
1696
+ func ptrFromHandle_api_GoValue(h CGoHandle) *api.GoValue {
1697
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "api.GoValue")
1698
+ if p == nil {
1699
+ return nil
1700
+ }
1701
+ return gopyh.Embed(p, reflect.TypeOf(api.GoValue{})).(*api.GoValue)
1702
+ }
1703
+ func handleFromPtr_api_GoValue(p interface{}) CGoHandle {
1704
+ return CGoHandle(gopyh.Register("api.GoValue", p))
1705
+ }
1706
+
1707
+ // Converters for non-pointer handles for type: api.SourceLocation
1708
+ func ptrFromHandle_api_SourceLocation(h CGoHandle) *api.SourceLocation {
1709
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "api.SourceLocation")
1710
+ if p == nil {
1711
+ return nil
1712
+ }
1713
+ return gopyh.Embed(p, reflect.TypeOf(api.SourceLocation{})).(*api.SourceLocation)
1714
+ }
1715
+ func handleFromPtr_api_SourceLocation(p interface{}) CGoHandle {
1716
+ return CGoHandle(gopyh.Register("api.SourceLocation", p))
1717
+ }
1718
+
1719
+ // Converters for non-pointer handles for type: api.UnknownFunctionHandler
1720
+ func ptrFromHandle_api_UnknownFunctionHandler(h CGoHandle) *api.UnknownFunctionHandler {
1721
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "api.UnknownFunctionHandler")
1722
+ if p == nil {
1723
+ return nil
1724
+ }
1725
+ return gopyh.Embed(p, reflect.TypeOf(api.UnknownFunctionHandler{})).(*api.UnknownFunctionHandler)
1726
+ }
1727
+ func handleFromPtr_api_UnknownFunctionHandler(p interface{}) CGoHandle {
1728
+ return CGoHandle(gopyh.Register("api.UnknownFunctionHandler", p))
1729
+ }
1730
+
1731
+ // Converters for non-pointer handles for type: api.VM
1732
+ func ptrFromHandle_api_VM(h CGoHandle) *api.VM {
1733
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "api.VM")
1734
+ if p == nil {
1735
+ return nil
1736
+ }
1737
+ return gopyh.Embed(p, reflect.TypeOf(api.VM{})).(*api.VM)
1738
+ }
1739
+ func handleFromPtr_api_VM(p interface{}) CGoHandle {
1740
+ return CGoHandle(gopyh.Register("api.VM", p))
1741
+ }
1742
+
1743
+ // Converters for non-pointer handles for type: api.VMCompatibilityShim
1744
+ func ptrFromHandle_api_VMCompatibilityShim(h CGoHandle) *api.VMCompatibilityShim {
1745
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "api.VMCompatibilityShim")
1746
+ if p == nil {
1747
+ return nil
1748
+ }
1749
+ return gopyh.Embed(p, reflect.TypeOf(api.VMCompatibilityShim{})).(*api.VMCompatibilityShim)
1750
+ }
1751
+ func handleFromPtr_api_VMCompatibilityShim(p interface{}) CGoHandle {
1752
+ return CGoHandle(gopyh.Register("api.VMCompatibilityShim", p))
1753
+ }
1754
+
1755
+ // Converters for non-pointer handles for type: api.VMConfig
1756
+ func ptrFromHandle_api_VMConfig(h CGoHandle) *api.VMConfig {
1757
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "api.VMConfig")
1758
+ if p == nil {
1759
+ return nil
1760
+ }
1761
+ return gopyh.Embed(p, reflect.TypeOf(api.VMConfig{})).(*api.VMConfig)
1762
+ }
1763
+ func handleFromPtr_api_VMConfig(p interface{}) CGoHandle {
1764
+ return CGoHandle(gopyh.Register("api.VMConfig", p))
1765
+ }
1766
+
1767
+ // Converters for non-pointer handles for type: api.VMError
1768
+ func ptrFromHandle_api_VMError(h CGoHandle) *api.VMError {
1769
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "api.VMError")
1770
+ if p == nil {
1771
+ return nil
1772
+ }
1773
+ return gopyh.Embed(p, reflect.TypeOf(api.VMError{})).(*api.VMError)
1774
+ }
1775
+ func handleFromPtr_api_VMError(p interface{}) CGoHandle {
1776
+ return CGoHandle(gopyh.Register("api.VMError", p))
1777
+ }
1778
+
1779
+ // Converters for implicit pointer handles for type: map[string]*api.ClassMethod
1780
+ func ptrFromHandle_Map_string_Ptr_api_ClassMethod(h CGoHandle) *map[string]*api.ClassMethod {
1781
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "map[string]*api.ClassMethod")
1782
+ if p == nil {
1783
+ return nil
1784
+ }
1785
+ return p.(*map[string]*api.ClassMethod)
1786
+ }
1787
+ func deptrFromHandle_Map_string_Ptr_api_ClassMethod(h CGoHandle) map[string]*api.ClassMethod {
1788
+ p := ptrFromHandle_Map_string_Ptr_api_ClassMethod(h)
1789
+ if p == nil {
1790
+ return nil
1791
+ }
1792
+ return *p
1793
+ }
1794
+ func handleFromPtr_Map_string_Ptr_api_ClassMethod(p interface{}) CGoHandle {
1795
+ return CGoHandle(gopyh.Register("map[string]*api.ClassMethod", p))
1796
+ }
1797
+
1798
+ // --- wrapping map: map[string]*api.ClassMethod ---
1799
+ //
1800
+ //export Map_string_Ptr_api_ClassMethod_CTor
1801
+ func Map_string_Ptr_api_ClassMethod_CTor() CGoHandle {
1802
+ return CGoHandle(handleFromPtr_Map_string_Ptr_api_ClassMethod(&map[string]*api.ClassMethod{}))
1803
+ }
1804
+
1805
+ //export Map_string_Ptr_api_ClassMethod_len
1806
+ func Map_string_Ptr_api_ClassMethod_len(handle CGoHandle) int {
1807
+ return len(deptrFromHandle_Map_string_Ptr_api_ClassMethod(handle))
1808
+ }
1809
+
1810
+ //export Map_string_Ptr_api_ClassMethod_elem
1811
+ func Map_string_Ptr_api_ClassMethod_elem(handle CGoHandle, _ky *C.char) CGoHandle {
1812
+ s := deptrFromHandle_Map_string_Ptr_api_ClassMethod(handle)
1813
+ v, ok := s[C.GoString(_ky)]
1814
+ if !ok {
1815
+ C.PyErr_SetString(C.PyExc_KeyError, C.CString("key not in map"))
1816
+ }
1817
+ return handleFromPtr_Ptr_api_ClassMethod(&v)
1818
+ }
1819
+
1820
+ //export Map_string_Ptr_api_ClassMethod_contains
1821
+ func Map_string_Ptr_api_ClassMethod_contains(handle CGoHandle, _ky *C.char) C.char {
1822
+ s := deptrFromHandle_Map_string_Ptr_api_ClassMethod(handle)
1823
+ _, ok := s[C.GoString(_ky)]
1824
+ return boolGoToPy(ok)
1825
+ }
1826
+
1827
+ //export Map_string_Ptr_api_ClassMethod_set
1828
+ func Map_string_Ptr_api_ClassMethod_set(handle CGoHandle, _ky *C.char, _vl CGoHandle) {
1829
+ s := deptrFromHandle_Map_string_Ptr_api_ClassMethod(handle)
1830
+ s[C.GoString(_ky)] = ptrFromHandle_Ptr_api_ClassMethod(_vl)
1831
+ }
1832
+
1833
+ //export Map_string_Ptr_api_ClassMethod_delete
1834
+ func Map_string_Ptr_api_ClassMethod_delete(handle CGoHandle, _ky *C.char) {
1835
+ s := deptrFromHandle_Map_string_Ptr_api_ClassMethod(handle)
1836
+ delete(s, C.GoString(_ky))
1837
+ }
1838
+
1839
+ //export Map_string_Ptr_api_ClassMethod_keys
1840
+ func Map_string_Ptr_api_ClassMethod_keys(handle CGoHandle) CGoHandle {
1841
+ s := deptrFromHandle_Map_string_Ptr_api_ClassMethod(handle)
1842
+ kys := make([]string, 0, len(s))
1843
+ for k := range s {
1844
+ kys = append(kys, k)
1845
+ }
1846
+ return handleFromPtr_Slice_string(&kys)
1847
+ }
1848
+
1849
+ // Converters for implicit pointer handles for type: map[string]*api.ClassVariable
1850
+ func ptrFromHandle_Map_string_Ptr_api_ClassVariable(h CGoHandle) *map[string]*api.ClassVariable {
1851
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "map[string]*api.ClassVariable")
1852
+ if p == nil {
1853
+ return nil
1854
+ }
1855
+ return p.(*map[string]*api.ClassVariable)
1856
+ }
1857
+ func deptrFromHandle_Map_string_Ptr_api_ClassVariable(h CGoHandle) map[string]*api.ClassVariable {
1858
+ p := ptrFromHandle_Map_string_Ptr_api_ClassVariable(h)
1859
+ if p == nil {
1860
+ return nil
1861
+ }
1862
+ return *p
1863
+ }
1864
+ func handleFromPtr_Map_string_Ptr_api_ClassVariable(p interface{}) CGoHandle {
1865
+ return CGoHandle(gopyh.Register("map[string]*api.ClassVariable", p))
1866
+ }
1867
+
1868
+ // --- wrapping map: map[string]*api.ClassVariable ---
1869
+ //
1870
+ //export Map_string_Ptr_api_ClassVariable_CTor
1871
+ func Map_string_Ptr_api_ClassVariable_CTor() CGoHandle {
1872
+ return CGoHandle(handleFromPtr_Map_string_Ptr_api_ClassVariable(&map[string]*api.ClassVariable{}))
1873
+ }
1874
+
1875
+ //export Map_string_Ptr_api_ClassVariable_len
1876
+ func Map_string_Ptr_api_ClassVariable_len(handle CGoHandle) int {
1877
+ return len(deptrFromHandle_Map_string_Ptr_api_ClassVariable(handle))
1878
+ }
1879
+
1880
+ //export Map_string_Ptr_api_ClassVariable_elem
1881
+ func Map_string_Ptr_api_ClassVariable_elem(handle CGoHandle, _ky *C.char) CGoHandle {
1882
+ s := deptrFromHandle_Map_string_Ptr_api_ClassVariable(handle)
1883
+ v, ok := s[C.GoString(_ky)]
1884
+ if !ok {
1885
+ C.PyErr_SetString(C.PyExc_KeyError, C.CString("key not in map"))
1886
+ }
1887
+ return handleFromPtr_Ptr_api_ClassVariable(&v)
1888
+ }
1889
+
1890
+ //export Map_string_Ptr_api_ClassVariable_contains
1891
+ func Map_string_Ptr_api_ClassVariable_contains(handle CGoHandle, _ky *C.char) C.char {
1892
+ s := deptrFromHandle_Map_string_Ptr_api_ClassVariable(handle)
1893
+ _, ok := s[C.GoString(_ky)]
1894
+ return boolGoToPy(ok)
1895
+ }
1896
+
1897
+ //export Map_string_Ptr_api_ClassVariable_set
1898
+ func Map_string_Ptr_api_ClassVariable_set(handle CGoHandle, _ky *C.char, _vl CGoHandle) {
1899
+ s := deptrFromHandle_Map_string_Ptr_api_ClassVariable(handle)
1900
+ s[C.GoString(_ky)] = ptrFromHandle_Ptr_api_ClassVariable(_vl)
1901
+ }
1902
+
1903
+ //export Map_string_Ptr_api_ClassVariable_delete
1904
+ func Map_string_Ptr_api_ClassVariable_delete(handle CGoHandle, _ky *C.char) {
1905
+ s := deptrFromHandle_Map_string_Ptr_api_ClassVariable(handle)
1906
+ delete(s, C.GoString(_ky))
1907
+ }
1908
+
1909
+ //export Map_string_Ptr_api_ClassVariable_keys
1910
+ func Map_string_Ptr_api_ClassVariable_keys(handle CGoHandle) CGoHandle {
1911
+ s := deptrFromHandle_Map_string_Ptr_api_ClassVariable(handle)
1912
+ kys := make([]string, 0, len(s))
1913
+ for k := range s {
1914
+ kys = append(kys, k)
1915
+ }
1916
+ return handleFromPtr_Slice_string(&kys)
1917
+ }
1918
+
1919
+ // Converters for implicit pointer handles for type: map[string]*environment.Class
1920
+ func ptrFromHandle_Map_string_Ptr_environment_Class(h CGoHandle) *map[string]*environment.Class {
1921
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "map[string]*environment.Class")
1922
+ if p == nil {
1923
+ return nil
1924
+ }
1925
+ return p.(*map[string]*environment.Class)
1926
+ }
1927
+ func deptrFromHandle_Map_string_Ptr_environment_Class(h CGoHandle) map[string]*environment.Class {
1928
+ p := ptrFromHandle_Map_string_Ptr_environment_Class(h)
1929
+ if p == nil {
1930
+ return nil
1931
+ }
1932
+ return *p
1933
+ }
1934
+ func handleFromPtr_Map_string_Ptr_environment_Class(p interface{}) CGoHandle {
1935
+ return CGoHandle(gopyh.Register("map[string]*environment.Class", p))
1936
+ }
1937
+
1938
+ // --- wrapping map: map[string]*environment.Class ---
1939
+ //
1940
+ //export Map_string_Ptr_environment_Class_CTor
1941
+ func Map_string_Ptr_environment_Class_CTor() CGoHandle {
1942
+ return CGoHandle(handleFromPtr_Map_string_Ptr_environment_Class(&map[string]*environment.Class{}))
1943
+ }
1944
+
1945
+ //export Map_string_Ptr_environment_Class_len
1946
+ func Map_string_Ptr_environment_Class_len(handle CGoHandle) int {
1947
+ return len(deptrFromHandle_Map_string_Ptr_environment_Class(handle))
1948
+ }
1949
+
1950
+ //export Map_string_Ptr_environment_Class_elem
1951
+ func Map_string_Ptr_environment_Class_elem(handle CGoHandle, _ky *C.char) CGoHandle {
1952
+ s := deptrFromHandle_Map_string_Ptr_environment_Class(handle)
1953
+ v, ok := s[C.GoString(_ky)]
1954
+ if !ok {
1955
+ C.PyErr_SetString(C.PyExc_KeyError, C.CString("key not in map"))
1956
+ }
1957
+ return handleFromPtr_Ptr_environment_Class(&v)
1958
+ }
1959
+
1960
+ //export Map_string_Ptr_environment_Class_contains
1961
+ func Map_string_Ptr_environment_Class_contains(handle CGoHandle, _ky *C.char) C.char {
1962
+ s := deptrFromHandle_Map_string_Ptr_environment_Class(handle)
1963
+ _, ok := s[C.GoString(_ky)]
1964
+ return boolGoToPy(ok)
1965
+ }
1966
+
1967
+ //export Map_string_Ptr_environment_Class_set
1968
+ func Map_string_Ptr_environment_Class_set(handle CGoHandle, _ky *C.char, _vl CGoHandle) {
1969
+ s := deptrFromHandle_Map_string_Ptr_environment_Class(handle)
1970
+ s[C.GoString(_ky)] = ptrFromHandle_Ptr_environment_Class(_vl)
1971
+ }
1972
+
1973
+ //export Map_string_Ptr_environment_Class_delete
1974
+ func Map_string_Ptr_environment_Class_delete(handle CGoHandle, _ky *C.char) {
1975
+ s := deptrFromHandle_Map_string_Ptr_environment_Class(handle)
1976
+ delete(s, C.GoString(_ky))
1977
+ }
1978
+
1979
+ //export Map_string_Ptr_environment_Class_keys
1980
+ func Map_string_Ptr_environment_Class_keys(handle CGoHandle) CGoHandle {
1981
+ s := deptrFromHandle_Map_string_Ptr_environment_Class(handle)
1982
+ kys := make([]string, 0, len(s))
1983
+ for k := range s {
1984
+ kys = append(kys, k)
1985
+ }
1986
+ return handleFromPtr_Slice_string(&kys)
1987
+ }
1988
+
1989
+ // Converters for implicit pointer handles for type: map[string]*environment.Function
1990
+ func ptrFromHandle_Map_string_Ptr_environment_Function(h CGoHandle) *map[string]*environment.Function {
1991
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "map[string]*environment.Function")
1992
+ if p == nil {
1993
+ return nil
1994
+ }
1995
+ return p.(*map[string]*environment.Function)
1996
+ }
1997
+ func deptrFromHandle_Map_string_Ptr_environment_Function(h CGoHandle) map[string]*environment.Function {
1998
+ p := ptrFromHandle_Map_string_Ptr_environment_Function(h)
1999
+ if p == nil {
2000
+ return nil
2001
+ }
2002
+ return *p
2003
+ }
2004
+ func handleFromPtr_Map_string_Ptr_environment_Function(p interface{}) CGoHandle {
2005
+ return CGoHandle(gopyh.Register("map[string]*environment.Function", p))
2006
+ }
2007
+
2008
+ // --- wrapping map: map[string]*environment.Function ---
2009
+ //
2010
+ //export Map_string_Ptr_environment_Function_CTor
2011
+ func Map_string_Ptr_environment_Function_CTor() CGoHandle {
2012
+ return CGoHandle(handleFromPtr_Map_string_Ptr_environment_Function(&map[string]*environment.Function{}))
2013
+ }
2014
+
2015
+ //export Map_string_Ptr_environment_Function_len
2016
+ func Map_string_Ptr_environment_Function_len(handle CGoHandle) int {
2017
+ return len(deptrFromHandle_Map_string_Ptr_environment_Function(handle))
2018
+ }
2019
+
2020
+ //export Map_string_Ptr_environment_Function_elem
2021
+ func Map_string_Ptr_environment_Function_elem(handle CGoHandle, _ky *C.char) CGoHandle {
2022
+ s := deptrFromHandle_Map_string_Ptr_environment_Function(handle)
2023
+ v, ok := s[C.GoString(_ky)]
2024
+ if !ok {
2025
+ C.PyErr_SetString(C.PyExc_KeyError, C.CString("key not in map"))
2026
+ }
2027
+ return handleFromPtr_Ptr_environment_Function(&v)
2028
+ }
2029
+
2030
+ //export Map_string_Ptr_environment_Function_contains
2031
+ func Map_string_Ptr_environment_Function_contains(handle CGoHandle, _ky *C.char) C.char {
2032
+ s := deptrFromHandle_Map_string_Ptr_environment_Function(handle)
2033
+ _, ok := s[C.GoString(_ky)]
2034
+ return boolGoToPy(ok)
2035
+ }
2036
+
2037
+ //export Map_string_Ptr_environment_Function_set
2038
+ func Map_string_Ptr_environment_Function_set(handle CGoHandle, _ky *C.char, _vl CGoHandle) {
2039
+ s := deptrFromHandle_Map_string_Ptr_environment_Function(handle)
2040
+ s[C.GoString(_ky)] = ptrFromHandle_Ptr_environment_Function(_vl)
2041
+ }
2042
+
2043
+ //export Map_string_Ptr_environment_Function_delete
2044
+ func Map_string_Ptr_environment_Function_delete(handle CGoHandle, _ky *C.char) {
2045
+ s := deptrFromHandle_Map_string_Ptr_environment_Function(handle)
2046
+ delete(s, C.GoString(_ky))
2047
+ }
2048
+
2049
+ //export Map_string_Ptr_environment_Function_keys
2050
+ func Map_string_Ptr_environment_Function_keys(handle CGoHandle) CGoHandle {
2051
+ s := deptrFromHandle_Map_string_Ptr_environment_Function(handle)
2052
+ kys := make([]string, 0, len(s))
2053
+ for k := range s {
2054
+ kys = append(kys, k)
2055
+ }
2056
+ return handleFromPtr_Slice_string(&kys)
2057
+ }
2058
+
2059
+ // Converters for implicit pointer handles for type: map[string]*environment.MemberVariable
2060
+ func ptrFromHandle_Map_string_Ptr_environment_MemberVariable(h CGoHandle) *map[string]*environment.MemberVariable {
2061
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "map[string]*environment.MemberVariable")
2062
+ if p == nil {
2063
+ return nil
2064
+ }
2065
+ return p.(*map[string]*environment.MemberVariable)
2066
+ }
2067
+ func deptrFromHandle_Map_string_Ptr_environment_MemberVariable(h CGoHandle) map[string]*environment.MemberVariable {
2068
+ p := ptrFromHandle_Map_string_Ptr_environment_MemberVariable(h)
2069
+ if p == nil {
2070
+ return nil
2071
+ }
2072
+ return *p
2073
+ }
2074
+ func handleFromPtr_Map_string_Ptr_environment_MemberVariable(p interface{}) CGoHandle {
2075
+ return CGoHandle(gopyh.Register("map[string]*environment.MemberVariable", p))
2076
+ }
2077
+
2078
+ // --- wrapping map: map[string]*environment.MemberVariable ---
2079
+ //
2080
+ //export Map_string_Ptr_environment_MemberVariable_CTor
2081
+ func Map_string_Ptr_environment_MemberVariable_CTor() CGoHandle {
2082
+ return CGoHandle(handleFromPtr_Map_string_Ptr_environment_MemberVariable(&map[string]*environment.MemberVariable{}))
2083
+ }
2084
+
2085
+ //export Map_string_Ptr_environment_MemberVariable_len
2086
+ func Map_string_Ptr_environment_MemberVariable_len(handle CGoHandle) int {
2087
+ return len(deptrFromHandle_Map_string_Ptr_environment_MemberVariable(handle))
2088
+ }
2089
+
2090
+ //export Map_string_Ptr_environment_MemberVariable_elem
2091
+ func Map_string_Ptr_environment_MemberVariable_elem(handle CGoHandle, _ky *C.char) CGoHandle {
2092
+ s := deptrFromHandle_Map_string_Ptr_environment_MemberVariable(handle)
2093
+ v, ok := s[C.GoString(_ky)]
2094
+ if !ok {
2095
+ C.PyErr_SetString(C.PyExc_KeyError, C.CString("key not in map"))
2096
+ }
2097
+ return handleFromPtr_Ptr_environment_MemberVariable(&v)
2098
+ }
2099
+
2100
+ //export Map_string_Ptr_environment_MemberVariable_contains
2101
+ func Map_string_Ptr_environment_MemberVariable_contains(handle CGoHandle, _ky *C.char) C.char {
2102
+ s := deptrFromHandle_Map_string_Ptr_environment_MemberVariable(handle)
2103
+ _, ok := s[C.GoString(_ky)]
2104
+ return boolGoToPy(ok)
2105
+ }
2106
+
2107
+ //export Map_string_Ptr_environment_MemberVariable_set
2108
+ func Map_string_Ptr_environment_MemberVariable_set(handle CGoHandle, _ky *C.char, _vl CGoHandle) {
2109
+ s := deptrFromHandle_Map_string_Ptr_environment_MemberVariable(handle)
2110
+ s[C.GoString(_ky)] = ptrFromHandle_Ptr_environment_MemberVariable(_vl)
2111
+ }
2112
+
2113
+ //export Map_string_Ptr_environment_MemberVariable_delete
2114
+ func Map_string_Ptr_environment_MemberVariable_delete(handle CGoHandle, _ky *C.char) {
2115
+ s := deptrFromHandle_Map_string_Ptr_environment_MemberVariable(handle)
2116
+ delete(s, C.GoString(_ky))
2117
+ }
2118
+
2119
+ //export Map_string_Ptr_environment_MemberVariable_keys
2120
+ func Map_string_Ptr_environment_MemberVariable_keys(handle CGoHandle) CGoHandle {
2121
+ s := deptrFromHandle_Map_string_Ptr_environment_MemberVariable(handle)
2122
+ kys := make([]string, 0, len(s))
2123
+ for k := range s {
2124
+ kys = append(kys, k)
2125
+ }
2126
+ return handleFromPtr_Slice_string(&kys)
2127
+ }
2128
+
2129
+ // Converters for implicit pointer handles for type: map[string]*environment.Variable
2130
+ func ptrFromHandle_Map_string_Ptr_environment_Variable(h CGoHandle) *map[string]*environment.Variable {
2131
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "map[string]*environment.Variable")
2132
+ if p == nil {
2133
+ return nil
2134
+ }
2135
+ return p.(*map[string]*environment.Variable)
2136
+ }
2137
+ func deptrFromHandle_Map_string_Ptr_environment_Variable(h CGoHandle) map[string]*environment.Variable {
2138
+ p := ptrFromHandle_Map_string_Ptr_environment_Variable(h)
2139
+ if p == nil {
2140
+ return nil
2141
+ }
2142
+ return *p
2143
+ }
2144
+ func handleFromPtr_Map_string_Ptr_environment_Variable(p interface{}) CGoHandle {
2145
+ return CGoHandle(gopyh.Register("map[string]*environment.Variable", p))
2146
+ }
2147
+
2148
+ // --- wrapping map: map[string]*environment.Variable ---
2149
+ //
2150
+ //export Map_string_Ptr_environment_Variable_CTor
2151
+ func Map_string_Ptr_environment_Variable_CTor() CGoHandle {
2152
+ return CGoHandle(handleFromPtr_Map_string_Ptr_environment_Variable(&map[string]*environment.Variable{}))
2153
+ }
2154
+
2155
+ //export Map_string_Ptr_environment_Variable_len
2156
+ func Map_string_Ptr_environment_Variable_len(handle CGoHandle) int {
2157
+ return len(deptrFromHandle_Map_string_Ptr_environment_Variable(handle))
2158
+ }
2159
+
2160
+ //export Map_string_Ptr_environment_Variable_elem
2161
+ func Map_string_Ptr_environment_Variable_elem(handle CGoHandle, _ky *C.char) CGoHandle {
2162
+ s := deptrFromHandle_Map_string_Ptr_environment_Variable(handle)
2163
+ v, ok := s[C.GoString(_ky)]
2164
+ if !ok {
2165
+ C.PyErr_SetString(C.PyExc_KeyError, C.CString("key not in map"))
2166
+ }
2167
+ return handleFromPtr_Ptr_environment_Variable(&v)
2168
+ }
2169
+
2170
+ //export Map_string_Ptr_environment_Variable_contains
2171
+ func Map_string_Ptr_environment_Variable_contains(handle CGoHandle, _ky *C.char) C.char {
2172
+ s := deptrFromHandle_Map_string_Ptr_environment_Variable(handle)
2173
+ _, ok := s[C.GoString(_ky)]
2174
+ return boolGoToPy(ok)
2175
+ }
2176
+
2177
+ //export Map_string_Ptr_environment_Variable_set
2178
+ func Map_string_Ptr_environment_Variable_set(handle CGoHandle, _ky *C.char, _vl CGoHandle) {
2179
+ s := deptrFromHandle_Map_string_Ptr_environment_Variable(handle)
2180
+ s[C.GoString(_ky)] = ptrFromHandle_Ptr_environment_Variable(_vl)
2181
+ }
2182
+
2183
+ //export Map_string_Ptr_environment_Variable_delete
2184
+ func Map_string_Ptr_environment_Variable_delete(handle CGoHandle, _ky *C.char) {
2185
+ s := deptrFromHandle_Map_string_Ptr_environment_Variable(handle)
2186
+ delete(s, C.GoString(_ky))
2187
+ }
2188
+
2189
+ //export Map_string_Ptr_environment_Variable_keys
2190
+ func Map_string_Ptr_environment_Variable_keys(handle CGoHandle) CGoHandle {
2191
+ s := deptrFromHandle_Map_string_Ptr_environment_Variable(handle)
2192
+ kys := make([]string, 0, len(s))
2193
+ for k := range s {
2194
+ kys = append(kys, k)
2195
+ }
2196
+ return handleFromPtr_Slice_string(&kys)
2197
+ }
2198
+
2199
+ // Converters for implicit pointer handles for type: map[string]api.GoValue
2200
+ func ptrFromHandle_Map_string_api_GoValue(h CGoHandle) *map[string]api.GoValue {
2201
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "map[string]api.GoValue")
2202
+ if p == nil {
2203
+ return nil
2204
+ }
2205
+ return p.(*map[string]api.GoValue)
2206
+ }
2207
+ func deptrFromHandle_Map_string_api_GoValue(h CGoHandle) map[string]api.GoValue {
2208
+ p := ptrFromHandle_Map_string_api_GoValue(h)
2209
+ if p == nil {
2210
+ return nil
2211
+ }
2212
+ return *p
2213
+ }
2214
+ func handleFromPtr_Map_string_api_GoValue(p interface{}) CGoHandle {
2215
+ return CGoHandle(gopyh.Register("map[string]api.GoValue", p))
2216
+ }
2217
+
2218
+ // --- wrapping map: map[string]api.GoValue ---
2219
+ //
2220
+ //export Map_string_api_GoValue_CTor
2221
+ func Map_string_api_GoValue_CTor() CGoHandle {
2222
+ return CGoHandle(handleFromPtr_Map_string_api_GoValue(&map[string]api.GoValue{}))
2223
+ }
2224
+
2225
+ //export Map_string_api_GoValue_len
2226
+ func Map_string_api_GoValue_len(handle CGoHandle) int {
2227
+ return len(deptrFromHandle_Map_string_api_GoValue(handle))
2228
+ }
2229
+
2230
+ //export Map_string_api_GoValue_elem
2231
+ func Map_string_api_GoValue_elem(handle CGoHandle, _ky *C.char) CGoHandle {
2232
+ s := deptrFromHandle_Map_string_api_GoValue(handle)
2233
+ v, ok := s[C.GoString(_ky)]
2234
+ if !ok {
2235
+ C.PyErr_SetString(C.PyExc_KeyError, C.CString("key not in map"))
2236
+ }
2237
+ return handleFromPtr_api_GoValue(&v)
2238
+ }
2239
+
2240
+ //export Map_string_api_GoValue_contains
2241
+ func Map_string_api_GoValue_contains(handle CGoHandle, _ky *C.char) C.char {
2242
+ s := deptrFromHandle_Map_string_api_GoValue(handle)
2243
+ _, ok := s[C.GoString(_ky)]
2244
+ return boolGoToPy(ok)
2245
+ }
2246
+
2247
+ //export Map_string_api_GoValue_set
2248
+ func Map_string_api_GoValue_set(handle CGoHandle, _ky *C.char, _vl CGoHandle) {
2249
+ s := deptrFromHandle_Map_string_api_GoValue(handle)
2250
+ s[C.GoString(_ky)] = *ptrFromHandle_api_GoValue(_vl)
2251
+ }
2252
+
2253
+ //export Map_string_api_GoValue_delete
2254
+ func Map_string_api_GoValue_delete(handle CGoHandle, _ky *C.char) {
2255
+ s := deptrFromHandle_Map_string_api_GoValue(handle)
2256
+ delete(s, C.GoString(_ky))
2257
+ }
2258
+
2259
+ //export Map_string_api_GoValue_keys
2260
+ func Map_string_api_GoValue_keys(handle CGoHandle) CGoHandle {
2261
+ s := deptrFromHandle_Map_string_api_GoValue(handle)
2262
+ kys := make([]string, 0, len(s))
2263
+ for k := range s {
2264
+ kys = append(kys, k)
2265
+ }
2266
+ return handleFromPtr_Slice_string(&kys)
2267
+ }
2268
+
2269
+ // ---- Global Variables: can only use functions to access ---
2270
+
2271
+ // ---- Interfaces ---
2272
+
2273
+ // ---- Structs ---
2274
+
2275
+ // --- wrapping struct: api.UnknownFunctionHandler ---
2276
+ //
2277
+ //export api_UnknownFunctionHandler_CTor
2278
+ func api_UnknownFunctionHandler_CTor() CGoHandle {
2279
+ return CGoHandle(handleFromPtr_api_UnknownFunctionHandler(&api.UnknownFunctionHandler{}))
2280
+ }
2281
+
2282
+ // --- wrapping struct: api.VMCompatibilityShim ---
2283
+ //
2284
+ //export api_VMCompatibilityShim_CTor
2285
+ func api_VMCompatibilityShim_CTor() CGoHandle {
2286
+ return CGoHandle(handleFromPtr_api_VMCompatibilityShim(&api.VMCompatibilityShim{}))
2287
+ }
2288
+
2289
+ //export api_VMCompatibilityShim_DefineFunction
2290
+ func api_VMCompatibilityShim_DefineFunction(_handle CGoHandle, id *C.char, name *C.char, argc C.longlong, function *C.PyObject) *C.char {
2291
+ _fun_arg := function
2292
+ _saved_thread := C.PyEval_SaveThread()
2293
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMCompatibilityShim")
2294
+ if __err != nil {
2295
+ return errorGoToPy(nil)
2296
+ }
2297
+ __err = gopyh.Embed(vifc, reflect.TypeOf(api.VMCompatibilityShim{})).(*api.VMCompatibilityShim).DefineFunction(C.GoString(id), C.GoString(name), int(argc), func(id string, jsonArgs string) string {
2298
+ if C.PyCallable_Check(_fun_arg) == 0 {
2299
+ return C.GoString(nil)
2300
+ }
2301
+ _gstate := C.PyGILState_Ensure()
2302
+ _fcargs := C.PyTuple_New(2)
2303
+ C.PyTuple_SetItem(_fcargs, 0, C.gopy_build_string(C.CString(id)))
2304
+ C.PyTuple_SetItem(_fcargs, 1, C.gopy_build_string(C.CString(jsonArgs)))
2305
+ _fcret := C.PyObject_CallObject(_fun_arg, _fcargs)
2306
+ C.gopy_decref(_fcargs)
2307
+ C.gopy_err_handle()
2308
+ C.PyGILState_Release(_gstate)
2309
+ return C.GoString(C.PyBytes_AsString(_fcret))
2310
+ })
2311
+
2312
+ C.PyEval_RestoreThread(_saved_thread)
2313
+ if __err != nil {
2314
+ estr := C.CString(__err.Error())
2315
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2316
+ return estr
2317
+ }
2318
+ return C.CString("")
2319
+ }
2320
+
2321
+ //export api_VMCompatibilityShim_BuildNewClassVariableWithGetter
2322
+ func api_VMCompatibilityShim_BuildNewClassVariableWithGetter(_handle CGoHandle, variable CGoHandle, getterID *C.char, getter *C.PyObject) CGoHandle {
2323
+ _fun_arg := getter
2324
+ _saved_thread := C.PyEval_SaveThread()
2325
+ defer C.PyEval_RestoreThread(_saved_thread)
2326
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMCompatibilityShim")
2327
+ if __err != nil {
2328
+ return handleFromPtr_Ptr_api_ClassVariable(nil)
2329
+ }
2330
+ return handleFromPtr_Ptr_api_ClassVariable(gopyh.Embed(vifc, reflect.TypeOf(api.VMCompatibilityShim{})).(*api.VMCompatibilityShim).BuildNewClassVariableWithGetter(ptrFromHandle_Ptr_api_ClassVariable(variable), C.GoString(getterID), func(id string, jsonArgs string) string {
2331
+ if C.PyCallable_Check(_fun_arg) == 0 {
2332
+ return C.GoString(nil)
2333
+ }
2334
+ _gstate := C.PyGILState_Ensure()
2335
+ _fcargs := C.PyTuple_New(2)
2336
+ C.PyTuple_SetItem(_fcargs, 0, C.gopy_build_string(C.CString(id)))
2337
+ C.PyTuple_SetItem(_fcargs, 1, C.gopy_build_string(C.CString(jsonArgs)))
2338
+ _fcret := C.PyObject_CallObject(_fun_arg, _fcargs)
2339
+ C.gopy_decref(_fcargs)
2340
+ C.gopy_err_handle()
2341
+ C.PyGILState_Release(_gstate)
2342
+ return C.GoString(C.PyBytes_AsString(_fcret))
2343
+ }))
2344
+
2345
+ }
2346
+
2347
+ //export api_VMCompatibilityShim_BuildNewClassVariableWithSetter
2348
+ func api_VMCompatibilityShim_BuildNewClassVariableWithSetter(_handle CGoHandle, variable CGoHandle, setterID *C.char, setter *C.PyObject) CGoHandle {
2349
+ _fun_arg := setter
2350
+ _saved_thread := C.PyEval_SaveThread()
2351
+ defer C.PyEval_RestoreThread(_saved_thread)
2352
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMCompatibilityShim")
2353
+ if __err != nil {
2354
+ return handleFromPtr_Ptr_api_ClassVariable(nil)
2355
+ }
2356
+ return handleFromPtr_Ptr_api_ClassVariable(gopyh.Embed(vifc, reflect.TypeOf(api.VMCompatibilityShim{})).(*api.VMCompatibilityShim).BuildNewClassVariableWithSetter(ptrFromHandle_Ptr_api_ClassVariable(variable), C.GoString(setterID), func(id string, jsonArgs string) string {
2357
+ if C.PyCallable_Check(_fun_arg) == 0 {
2358
+ return C.GoString(nil)
2359
+ }
2360
+ _gstate := C.PyGILState_Ensure()
2361
+ _fcargs := C.PyTuple_New(2)
2362
+ C.PyTuple_SetItem(_fcargs, 0, C.gopy_build_string(C.CString(id)))
2363
+ C.PyTuple_SetItem(_fcargs, 1, C.gopy_build_string(C.CString(jsonArgs)))
2364
+ _fcret := C.PyObject_CallObject(_fun_arg, _fcargs)
2365
+ C.gopy_decref(_fcargs)
2366
+ C.gopy_err_handle()
2367
+ C.PyGILState_Release(_gstate)
2368
+ return C.GoString(C.PyBytes_AsString(_fcret))
2369
+ }))
2370
+
2371
+ }
2372
+
2373
+ //export api_VMCompatibilityShim_BuildNewClassMethod
2374
+ func api_VMCompatibilityShim_BuildNewClassMethod(_handle CGoHandle, method CGoHandle, id *C.char, function *C.PyObject) CGoHandle {
2375
+ _fun_arg := function
2376
+ _saved_thread := C.PyEval_SaveThread()
2377
+ defer C.PyEval_RestoreThread(_saved_thread)
2378
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMCompatibilityShim")
2379
+ if __err != nil {
2380
+ return handleFromPtr_Ptr_api_ClassMethod(nil)
2381
+ }
2382
+ return handleFromPtr_Ptr_api_ClassMethod(gopyh.Embed(vifc, reflect.TypeOf(api.VMCompatibilityShim{})).(*api.VMCompatibilityShim).BuildNewClassMethod(ptrFromHandle_Ptr_api_ClassMethod(method), C.GoString(id), func(id string, jsonArgs string) string {
2383
+ if C.PyCallable_Check(_fun_arg) == 0 {
2384
+ return C.GoString(nil)
2385
+ }
2386
+ _gstate := C.PyGILState_Ensure()
2387
+ _fcargs := C.PyTuple_New(2)
2388
+ C.PyTuple_SetItem(_fcargs, 0, C.gopy_build_string(C.CString(id)))
2389
+ C.PyTuple_SetItem(_fcargs, 1, C.gopy_build_string(C.CString(jsonArgs)))
2390
+ _fcret := C.PyObject_CallObject(_fun_arg, _fcargs)
2391
+ C.gopy_decref(_fcargs)
2392
+ C.gopy_err_handle()
2393
+ C.PyGILState_Release(_gstate)
2394
+ return C.GoString(C.PyBytes_AsString(_fcret))
2395
+ }))
2396
+
2397
+ }
2398
+
2399
+ //export api_VMCompatibilityShim_BuildNewUnknownFunctionHandler
2400
+ func api_VMCompatibilityShim_BuildNewUnknownFunctionHandler(_handle CGoHandle, id *C.char, function *C.PyObject) CGoHandle {
2401
+ _fun_arg := function
2402
+ _saved_thread := C.PyEval_SaveThread()
2403
+ defer C.PyEval_RestoreThread(_saved_thread)
2404
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMCompatibilityShim")
2405
+ if __err != nil {
2406
+ return handleFromPtr_api_UnknownFunctionHandler(nil)
2407
+ }
2408
+ cret := gopyh.Embed(vifc, reflect.TypeOf(api.VMCompatibilityShim{})).(*api.VMCompatibilityShim).BuildNewUnknownFunctionHandler(C.GoString(id), func(id string, jsonArgs string) string {
2409
+ if C.PyCallable_Check(_fun_arg) == 0 {
2410
+ return C.GoString(nil)
2411
+ }
2412
+ _gstate := C.PyGILState_Ensure()
2413
+ _fcargs := C.PyTuple_New(2)
2414
+ C.PyTuple_SetItem(_fcargs, 0, C.gopy_build_string(C.CString(id)))
2415
+ C.PyTuple_SetItem(_fcargs, 1, C.gopy_build_string(C.CString(jsonArgs)))
2416
+ _fcret := C.PyObject_CallObject(_fun_arg, _fcargs)
2417
+ C.gopy_decref(_fcargs)
2418
+ C.gopy_err_handle()
2419
+ C.PyGILState_Release(_gstate)
2420
+ return C.GoString(C.PyBytes_AsString(_fcret))
2421
+ })
2422
+
2423
+ return handleFromPtr_api_UnknownFunctionHandler(&cret)
2424
+ }
2425
+
2426
+ //export api_VMCompatibilityShim_IsClassDefined
2427
+ func api_VMCompatibilityShim_IsClassDefined(_handle CGoHandle, name *C.char) C.char {
2428
+ _saved_thread := C.PyEval_SaveThread()
2429
+ defer C.PyEval_RestoreThread(_saved_thread)
2430
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMCompatibilityShim")
2431
+ if __err != nil {
2432
+ return boolGoToPy(false)
2433
+ }
2434
+ return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMCompatibilityShim{})).(*api.VMCompatibilityShim).IsClassDefined(C.GoString(name)))
2435
+
2436
+ }
2437
+
2438
+ //export api_VMCompatibilityShim_LookupObject
2439
+ func api_VMCompatibilityShim_LookupObject(_handle CGoHandle, id *C.char) CGoHandle {
2440
+ _saved_thread := C.PyEval_SaveThread()
2441
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMCompatibilityShim")
2442
+ if __err != nil {
2443
+ return handleFromPtr_api_GoValue(nil)
2444
+ }
2445
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VMCompatibilityShim{})).(*api.VMCompatibilityShim).LookupObject(C.GoString(id))
2446
+
2447
+ C.PyEval_RestoreThread(_saved_thread)
2448
+ if __err != nil {
2449
+ estr := C.CString(__err.Error())
2450
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2451
+ C.free(unsafe.Pointer(estr))
2452
+ return handleFromPtr_api_GoValue(nil)
2453
+ }
2454
+ return handleFromPtr_api_GoValue(&cret)
2455
+ }
2456
+
2457
+ //export api_VMCompatibilityShim_GetObjectMRO
2458
+ func api_VMCompatibilityShim_GetObjectMRO(_handle CGoHandle, id *C.char) CGoHandle {
2459
+ _saved_thread := C.PyEval_SaveThread()
2460
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMCompatibilityShim")
2461
+ if __err != nil {
2462
+ return handleFromPtr_Slice_string(nil)
2463
+ }
2464
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VMCompatibilityShim{})).(*api.VMCompatibilityShim).GetObjectMRO(C.GoString(id))
2465
+
2466
+ C.PyEval_RestoreThread(_saved_thread)
2467
+ if __err != nil {
2468
+ estr := C.CString(__err.Error())
2469
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2470
+ C.free(unsafe.Pointer(estr))
2471
+ return handleFromPtr_Slice_string(nil)
2472
+ }
2473
+ return handleFromPtr_Slice_string(&cret)
2474
+ }
2475
+
2476
+ //export api_VMCompatibilityShim_GetObjectImmediateFunctions
2477
+ func api_VMCompatibilityShim_GetObjectImmediateFunctions(_handle CGoHandle, id *C.char) CGoHandle {
2478
+ _saved_thread := C.PyEval_SaveThread()
2479
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMCompatibilityShim")
2480
+ if __err != nil {
2481
+ return handleFromPtr_Slice_string(nil)
2482
+ }
2483
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VMCompatibilityShim{})).(*api.VMCompatibilityShim).GetObjectImmediateFunctions(C.GoString(id))
2484
+
2485
+ C.PyEval_RestoreThread(_saved_thread)
2486
+ if __err != nil {
2487
+ estr := C.CString(__err.Error())
2488
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2489
+ C.free(unsafe.Pointer(estr))
2490
+ return handleFromPtr_Slice_string(nil)
2491
+ }
2492
+ return handleFromPtr_Slice_string(&cret)
2493
+ }
2494
+
2495
+ //export api_VMCompatibilityShim_GetObjectImmediateVariables
2496
+ func api_VMCompatibilityShim_GetObjectImmediateVariables(_handle CGoHandle, id *C.char) CGoHandle {
2497
+ _saved_thread := C.PyEval_SaveThread()
2498
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMCompatibilityShim")
2499
+ if __err != nil {
2500
+ return handleFromPtr_Slice_string(nil)
2501
+ }
2502
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VMCompatibilityShim{})).(*api.VMCompatibilityShim).GetObjectImmediateVariables(C.GoString(id))
2503
+
2504
+ C.PyEval_RestoreThread(_saved_thread)
2505
+ if __err != nil {
2506
+ estr := C.CString(__err.Error())
2507
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2508
+ C.free(unsafe.Pointer(estr))
2509
+ return handleFromPtr_Slice_string(nil)
2510
+ }
2511
+ return handleFromPtr_Slice_string(&cret)
2512
+ }
2513
+
2514
+ //export api_VMCompatibilityShim_AddVariableToObject
2515
+ func api_VMCompatibilityShim_AddVariableToObject(_handle CGoHandle, id *C.char, variable CGoHandle) *C.char {
2516
+ _saved_thread := C.PyEval_SaveThread()
2517
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMCompatibilityShim")
2518
+ if __err != nil {
2519
+ return errorGoToPy(nil)
2520
+ }
2521
+ __err = gopyh.Embed(vifc, reflect.TypeOf(api.VMCompatibilityShim{})).(*api.VMCompatibilityShim).AddVariableToObject(C.GoString(id), ptrFromHandle_Ptr_api_ClassVariable(variable))
2522
+
2523
+ C.PyEval_RestoreThread(_saved_thread)
2524
+ if __err != nil {
2525
+ estr := C.CString(__err.Error())
2526
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2527
+ return estr
2528
+ }
2529
+ return C.CString("")
2530
+ }
2531
+
2532
+ // --- wrapping struct: api.VMConfig ---
2533
+ //
2534
+ //export api_VMConfig_CTor
2535
+ func api_VMConfig_CTor() CGoHandle {
2536
+ return CGoHandle(handleFromPtr_api_VMConfig(&api.VMConfig{}))
2537
+ }
2538
+
2539
+ //export api_VMConfig_Stdout_Get
2540
+ func api_VMConfig_Stdout_Get(handle CGoHandle) CGoHandle {
2541
+ op := ptrFromHandle_api_VMConfig(handle)
2542
+ return handleFromPtr_io_Writer(op.Stdout)
2543
+ }
2544
+
2545
+ //export api_VMConfig_Stdout_Set
2546
+ func api_VMConfig_Stdout_Set(handle CGoHandle, val CGoHandle) {
2547
+ op := ptrFromHandle_api_VMConfig(handle)
2548
+ op.Stdout = ptrFromHandle_io_Writer(val)
2549
+ }
2550
+
2551
+ //export api_VMConfig_Stdin_Get
2552
+ func api_VMConfig_Stdin_Get(handle CGoHandle) CGoHandle {
2553
+ op := ptrFromHandle_api_VMConfig(handle)
2554
+ return handleFromPtr_io_Reader(op.Stdin)
2555
+ }
2556
+
2557
+ //export api_VMConfig_Stdin_Set
2558
+ func api_VMConfig_Stdin_Set(handle CGoHandle, val CGoHandle) {
2559
+ op := ptrFromHandle_api_VMConfig(handle)
2560
+ op.Stdin = ptrFromHandle_io_Reader(val)
2561
+ }
2562
+
2563
+ //export api_VMConfig_Timeout_Get
2564
+ func api_VMConfig_Timeout_Get(handle CGoHandle) C.longlong {
2565
+ op := ptrFromHandle_api_VMConfig(handle)
2566
+ return C.longlong(int64(op.Timeout))
2567
+ }
2568
+
2569
+ //export api_VMConfig_Timeout_Set
2570
+ func api_VMConfig_Timeout_Set(handle CGoHandle, val C.longlong) {
2571
+ op := ptrFromHandle_api_VMConfig(handle)
2572
+ op.Timeout = time.Duration(int64(val))
2573
+ }
2574
+
2575
+ //export api_VMConfig_WorkingDirectory_Get
2576
+ func api_VMConfig_WorkingDirectory_Get(handle CGoHandle) *C.char {
2577
+ op := ptrFromHandle_api_VMConfig(handle)
2578
+ return C.CString(op.WorkingDirectory)
2579
+ }
2580
+
2581
+ //export api_VMConfig_WorkingDirectory_Set
2582
+ func api_VMConfig_WorkingDirectory_Set(handle CGoHandle, val *C.char) {
2583
+ op := ptrFromHandle_api_VMConfig(handle)
2584
+ op.WorkingDirectory = C.GoString(val)
2585
+ }
2586
+
2587
+ //export api_VMConfig_Validate
2588
+ func api_VMConfig_Validate(_handle CGoHandle) *C.char {
2589
+ _saved_thread := C.PyEval_SaveThread()
2590
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMConfig")
2591
+ if __err != nil {
2592
+ return errorGoToPy(nil)
2593
+ }
2594
+ __err = gopyh.Embed(vifc, reflect.TypeOf(api.VMConfig{})).(*api.VMConfig).Validate()
2595
+
2596
+ C.PyEval_RestoreThread(_saved_thread)
2597
+ if __err != nil {
2598
+ estr := C.CString(__err.Error())
2599
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2600
+ return estr
2601
+ }
2602
+ return C.CString("")
2603
+ }
2604
+
2605
+ // --- wrapping struct: api.ClassDefinition ---
2606
+ //
2607
+ //export api_ClassDefinition_CTor
2608
+ func api_ClassDefinition_CTor() CGoHandle {
2609
+ return CGoHandle(handleFromPtr_api_ClassDefinition(&api.ClassDefinition{}))
2610
+ }
2611
+
2612
+ //export api_ClassDefinition_Name_Get
2613
+ func api_ClassDefinition_Name_Get(handle CGoHandle) *C.char {
2614
+ op := ptrFromHandle_api_ClassDefinition(handle)
2615
+ return C.CString(op.Name)
2616
+ }
2617
+
2618
+ //export api_ClassDefinition_Name_Set
2619
+ func api_ClassDefinition_Name_Set(handle CGoHandle, val *C.char) {
2620
+ op := ptrFromHandle_api_ClassDefinition(handle)
2621
+ op.Name = C.GoString(val)
2622
+ }
2623
+
2624
+ //export api_ClassDefinition_PublicVariables_Get
2625
+ func api_ClassDefinition_PublicVariables_Get(handle CGoHandle) CGoHandle {
2626
+ op := ptrFromHandle_api_ClassDefinition(handle)
2627
+ return handleFromPtr_Map_string_Ptr_api_ClassVariable(&op.PublicVariables)
2628
+ }
2629
+
2630
+ //export api_ClassDefinition_PublicVariables_Set
2631
+ func api_ClassDefinition_PublicVariables_Set(handle CGoHandle, val CGoHandle) {
2632
+ op := ptrFromHandle_api_ClassDefinition(handle)
2633
+ op.PublicVariables = deptrFromHandle_Map_string_Ptr_api_ClassVariable(val)
2634
+ }
2635
+
2636
+ //export api_ClassDefinition_PrivateVariables_Get
2637
+ func api_ClassDefinition_PrivateVariables_Get(handle CGoHandle) CGoHandle {
2638
+ op := ptrFromHandle_api_ClassDefinition(handle)
2639
+ return handleFromPtr_Map_string_Ptr_api_ClassVariable(&op.PrivateVariables)
2640
+ }
2641
+
2642
+ //export api_ClassDefinition_PrivateVariables_Set
2643
+ func api_ClassDefinition_PrivateVariables_Set(handle CGoHandle, val CGoHandle) {
2644
+ op := ptrFromHandle_api_ClassDefinition(handle)
2645
+ op.PrivateVariables = deptrFromHandle_Map_string_Ptr_api_ClassVariable(val)
2646
+ }
2647
+
2648
+ //export api_ClassDefinition_SharedVariables_Get
2649
+ func api_ClassDefinition_SharedVariables_Get(handle CGoHandle) CGoHandle {
2650
+ op := ptrFromHandle_api_ClassDefinition(handle)
2651
+ return handleFromPtr_Map_string_Ptr_api_ClassVariable(&op.SharedVariables)
2652
+ }
2653
+
2654
+ //export api_ClassDefinition_SharedVariables_Set
2655
+ func api_ClassDefinition_SharedVariables_Set(handle CGoHandle, val CGoHandle) {
2656
+ op := ptrFromHandle_api_ClassDefinition(handle)
2657
+ op.SharedVariables = deptrFromHandle_Map_string_Ptr_api_ClassVariable(val)
2658
+ }
2659
+
2660
+ //export api_ClassDefinition_PublicMethods_Get
2661
+ func api_ClassDefinition_PublicMethods_Get(handle CGoHandle) CGoHandle {
2662
+ op := ptrFromHandle_api_ClassDefinition(handle)
2663
+ return handleFromPtr_Map_string_Ptr_api_ClassMethod(&op.PublicMethods)
2664
+ }
2665
+
2666
+ //export api_ClassDefinition_PublicMethods_Set
2667
+ func api_ClassDefinition_PublicMethods_Set(handle CGoHandle, val CGoHandle) {
2668
+ op := ptrFromHandle_api_ClassDefinition(handle)
2669
+ op.PublicMethods = deptrFromHandle_Map_string_Ptr_api_ClassMethod(val)
2670
+ }
2671
+
2672
+ //export api_ClassDefinition_PrivateMethods_Get
2673
+ func api_ClassDefinition_PrivateMethods_Get(handle CGoHandle) CGoHandle {
2674
+ op := ptrFromHandle_api_ClassDefinition(handle)
2675
+ return handleFromPtr_Map_string_Ptr_api_ClassMethod(&op.PrivateMethods)
2676
+ }
2677
+
2678
+ //export api_ClassDefinition_PrivateMethods_Set
2679
+ func api_ClassDefinition_PrivateMethods_Set(handle CGoHandle, val CGoHandle) {
2680
+ op := ptrFromHandle_api_ClassDefinition(handle)
2681
+ op.PrivateMethods = deptrFromHandle_Map_string_Ptr_api_ClassMethod(val)
2682
+ }
2683
+
2684
+ //export api_ClassDefinition_UnknownFunctionHandler_Get
2685
+ func api_ClassDefinition_UnknownFunctionHandler_Get(handle CGoHandle) CGoHandle {
2686
+ op := ptrFromHandle_api_ClassDefinition(handle)
2687
+ return handleFromPtr_Ptr_api_UnknownFunctionHandler(op.UnknownFunctionHandler)
2688
+ }
2689
+
2690
+ //export api_ClassDefinition_UnknownFunctionHandler_Set
2691
+ func api_ClassDefinition_UnknownFunctionHandler_Set(handle CGoHandle, val CGoHandle) {
2692
+ op := ptrFromHandle_api_ClassDefinition(handle)
2693
+ op.UnknownFunctionHandler = ptrFromHandle_Ptr_api_UnknownFunctionHandler(val)
2694
+ }
2695
+
2696
+ // --- wrapping struct: api.ClassMethod ---
2697
+ //
2698
+ //export api_ClassMethod_CTor
2699
+ func api_ClassMethod_CTor() CGoHandle {
2700
+ return CGoHandle(handleFromPtr_api_ClassMethod(&api.ClassMethod{}))
2701
+ }
2702
+
2703
+ //export api_ClassMethod_Name_Get
2704
+ func api_ClassMethod_Name_Get(handle CGoHandle) *C.char {
2705
+ op := ptrFromHandle_api_ClassMethod(handle)
2706
+ return C.CString(op.Name)
2707
+ }
2708
+
2709
+ //export api_ClassMethod_Name_Set
2710
+ func api_ClassMethod_Name_Set(handle CGoHandle, val *C.char) {
2711
+ op := ptrFromHandle_api_ClassMethod(handle)
2712
+ op.Name = C.GoString(val)
2713
+ }
2714
+
2715
+ //export api_ClassMethod_Argc_Get
2716
+ func api_ClassMethod_Argc_Get(handle CGoHandle) C.longlong {
2717
+ op := ptrFromHandle_api_ClassMethod(handle)
2718
+ return C.longlong(op.Argc)
2719
+ }
2720
+
2721
+ //export api_ClassMethod_Argc_Set
2722
+ func api_ClassMethod_Argc_Set(handle CGoHandle, val C.longlong) {
2723
+ op := ptrFromHandle_api_ClassMethod(handle)
2724
+ op.Argc = int(val)
2725
+ }
2726
+
2727
+ // --- wrapping struct: api.ExecutionResult ---
2728
+ //
2729
+ //export api_ExecutionResult_CTor
2730
+ func api_ExecutionResult_CTor() CGoHandle {
2731
+ return CGoHandle(handleFromPtr_api_ExecutionResult(&api.ExecutionResult{}))
2732
+ }
2733
+
2734
+ //export api_ExecutionResult_Value_Get
2735
+ func api_ExecutionResult_Value_Get(handle CGoHandle) CGoHandle {
2736
+ op := ptrFromHandle_api_ExecutionResult(handle)
2737
+ return handleFromPtr_api_GoValue(&op.Value)
2738
+ }
2739
+
2740
+ //export api_ExecutionResult_Value_Set
2741
+ func api_ExecutionResult_Value_Set(handle CGoHandle, val CGoHandle) {
2742
+ op := ptrFromHandle_api_ExecutionResult(handle)
2743
+ op.Value = *ptrFromHandle_api_GoValue(val)
2744
+ }
2745
+
2746
+ //export api_ExecutionResult_RawValue_Get
2747
+ func api_ExecutionResult_RawValue_Get(handle CGoHandle) CGoHandle {
2748
+ op := ptrFromHandle_api_ExecutionResult(handle)
2749
+ return handleFromPtr_environment_Value(op.RawValue)
2750
+ }
2751
+
2752
+ //export api_ExecutionResult_RawValue_Set
2753
+ func api_ExecutionResult_RawValue_Set(handle CGoHandle, val CGoHandle) {
2754
+ op := ptrFromHandle_api_ExecutionResult(handle)
2755
+ op.RawValue = ptrFromHandle_environment_Value(val)
2756
+ }
2757
+
2758
+ //export api_ExecutionResult_Output_Get
2759
+ func api_ExecutionResult_Output_Get(handle CGoHandle) *C.char {
2760
+ op := ptrFromHandle_api_ExecutionResult(handle)
2761
+ return C.CString(op.Output)
2762
+ }
2763
+
2764
+ //export api_ExecutionResult_Output_Set
2765
+ func api_ExecutionResult_Output_Set(handle CGoHandle, val *C.char) {
2766
+ op := ptrFromHandle_api_ExecutionResult(handle)
2767
+ op.Output = C.GoString(val)
2768
+ }
2769
+
2770
+ // --- wrapping struct: api.GoValue ---
2771
+ //
2772
+ //export api_GoValue_CTor
2773
+ func api_GoValue_CTor() CGoHandle {
2774
+ return CGoHandle(handleFromPtr_api_GoValue(&api.GoValue{}))
2775
+ }
2776
+
2777
+ //export api_GoValue_ID
2778
+ func api_GoValue_ID(_handle CGoHandle) *C.char {
2779
+ _saved_thread := C.PyEval_SaveThread()
2780
+ defer C.PyEval_RestoreThread(_saved_thread)
2781
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2782
+ if __err != nil {
2783
+ return C.CString("")
2784
+ }
2785
+ return C.CString(gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).ID())
2786
+
2787
+ }
2788
+
2789
+ //export api_GoValue_MarshalJSON
2790
+ func api_GoValue_MarshalJSON(_handle CGoHandle) CGoHandle {
2791
+ _saved_thread := C.PyEval_SaveThread()
2792
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2793
+ if __err != nil {
2794
+ return handleFromPtr_Slice_byte(nil)
2795
+ }
2796
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).MarshalJSON()
2797
+
2798
+ C.PyEval_RestoreThread(_saved_thread)
2799
+ if __err != nil {
2800
+ estr := C.CString(__err.Error())
2801
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2802
+ C.free(unsafe.Pointer(estr))
2803
+ return handleFromPtr_Slice_byte(nil)
2804
+ }
2805
+ return handleFromPtr_Slice_byte(&cret)
2806
+ }
2807
+
2808
+ //export api_GoValue_Type
2809
+ func api_GoValue_Type(_handle CGoHandle) *C.char {
2810
+ _saved_thread := C.PyEval_SaveThread()
2811
+ defer C.PyEval_RestoreThread(_saved_thread)
2812
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2813
+ if __err != nil {
2814
+ return C.CString("")
2815
+ }
2816
+ return C.CString(gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Type())
2817
+
2818
+ }
2819
+
2820
+ //export api_GoValue_Int
2821
+ func api_GoValue_Int(_handle CGoHandle) C.longlong {
2822
+ _saved_thread := C.PyEval_SaveThread()
2823
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2824
+ if __err != nil {
2825
+ return C.longlong(0)
2826
+ }
2827
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Int()
2828
+
2829
+ C.PyEval_RestoreThread(_saved_thread)
2830
+ if __err != nil {
2831
+ estr := C.CString(__err.Error())
2832
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2833
+ C.free(unsafe.Pointer(estr))
2834
+ return C.longlong(0)
2835
+ }
2836
+ return C.longlong(cret)
2837
+ }
2838
+
2839
+ //export api_GoValue_Float
2840
+ func api_GoValue_Float(_handle CGoHandle) C.double {
2841
+ _saved_thread := C.PyEval_SaveThread()
2842
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2843
+ if __err != nil {
2844
+ return C.double(0)
2845
+ }
2846
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Float()
2847
+
2848
+ C.PyEval_RestoreThread(_saved_thread)
2849
+ if __err != nil {
2850
+ estr := C.CString(__err.Error())
2851
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2852
+ C.free(unsafe.Pointer(estr))
2853
+ return C.double(0)
2854
+ }
2855
+ return C.double(cret)
2856
+ }
2857
+
2858
+ //export api_GoValue_String
2859
+ func api_GoValue_String(_handle CGoHandle) *C.char {
2860
+ _saved_thread := C.PyEval_SaveThread()
2861
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2862
+ if __err != nil {
2863
+ return C.CString("")
2864
+ }
2865
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).String()
2866
+
2867
+ C.PyEval_RestoreThread(_saved_thread)
2868
+ if __err != nil {
2869
+ estr := C.CString(__err.Error())
2870
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2871
+ C.free(unsafe.Pointer(estr))
2872
+ return C.CString("")
2873
+ }
2874
+ return C.CString(cret)
2875
+ }
2876
+
2877
+ //export api_GoValue_Bool
2878
+ func api_GoValue_Bool(_handle CGoHandle) C.char {
2879
+ _saved_thread := C.PyEval_SaveThread()
2880
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2881
+ if __err != nil {
2882
+ return boolGoToPy(false)
2883
+ }
2884
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Bool()
2885
+
2886
+ C.PyEval_RestoreThread(_saved_thread)
2887
+ if __err != nil {
2888
+ estr := C.CString(__err.Error())
2889
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2890
+ C.free(unsafe.Pointer(estr))
2891
+ return boolGoToPy(false)
2892
+ }
2893
+ return boolGoToPy(cret)
2894
+ }
2895
+
2896
+ //export api_GoValue_Slice
2897
+ func api_GoValue_Slice(_handle CGoHandle) CGoHandle {
2898
+ _saved_thread := C.PyEval_SaveThread()
2899
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2900
+ if __err != nil {
2901
+ return handleFromPtr_Slice_api_GoValue(nil)
2902
+ }
2903
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Slice()
2904
+
2905
+ C.PyEval_RestoreThread(_saved_thread)
2906
+ if __err != nil {
2907
+ estr := C.CString(__err.Error())
2908
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2909
+ C.free(unsafe.Pointer(estr))
2910
+ return handleFromPtr_Slice_api_GoValue(nil)
2911
+ }
2912
+ return handleFromPtr_Slice_api_GoValue(&cret)
2913
+ }
2914
+
2915
+ //export api_GoValue_Map
2916
+ func api_GoValue_Map(_handle CGoHandle) CGoHandle {
2917
+ _saved_thread := C.PyEval_SaveThread()
2918
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2919
+ if __err != nil {
2920
+ return handleFromPtr_Map_string_api_GoValue(nil)
2921
+ }
2922
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Map()
2923
+
2924
+ C.PyEval_RestoreThread(_saved_thread)
2925
+ if __err != nil {
2926
+ estr := C.CString(__err.Error())
2927
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2928
+ C.free(unsafe.Pointer(estr))
2929
+ return handleFromPtr_Map_string_api_GoValue(nil)
2930
+ }
2931
+ return handleFromPtr_Map_string_api_GoValue(&cret)
2932
+ }
2933
+
2934
+ //export api_GoValue_Object
2935
+ func api_GoValue_Object(_handle CGoHandle) CGoHandle {
2936
+ _saved_thread := C.PyEval_SaveThread()
2937
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2938
+ if __err != nil {
2939
+ return handleFromPtr_Ptr_environment_ObjectInstance(nil)
2940
+ }
2941
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Object()
2942
+
2943
+ C.PyEval_RestoreThread(_saved_thread)
2944
+ if __err != nil {
2945
+ estr := C.CString(__err.Error())
2946
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2947
+ C.free(unsafe.Pointer(estr))
2948
+ return handleFromPtr_Ptr_environment_ObjectInstance(nil)
2949
+ }
2950
+ return handleFromPtr_Ptr_environment_ObjectInstance(cret)
2951
+ }
2952
+
2953
+ // --- wrapping struct: api.SourceLocation ---
2954
+ //
2955
+ //export api_SourceLocation_CTor
2956
+ func api_SourceLocation_CTor() CGoHandle {
2957
+ return CGoHandle(handleFromPtr_api_SourceLocation(&api.SourceLocation{}))
2958
+ }
2959
+
2960
+ //export api_SourceLocation_Filename_Get
2961
+ func api_SourceLocation_Filename_Get(handle CGoHandle) *C.char {
2962
+ op := ptrFromHandle_api_SourceLocation(handle)
2963
+ return C.CString(op.Filename)
2964
+ }
2965
+
2966
+ //export api_SourceLocation_Filename_Set
2967
+ func api_SourceLocation_Filename_Set(handle CGoHandle, val *C.char) {
2968
+ op := ptrFromHandle_api_SourceLocation(handle)
2969
+ op.Filename = C.GoString(val)
2970
+ }
2971
+
2972
+ //export api_SourceLocation_Line_Get
2973
+ func api_SourceLocation_Line_Get(handle CGoHandle) C.longlong {
2974
+ op := ptrFromHandle_api_SourceLocation(handle)
2975
+ return C.longlong(op.Line)
2976
+ }
2977
+
2978
+ //export api_SourceLocation_Line_Set
2979
+ func api_SourceLocation_Line_Set(handle CGoHandle, val C.longlong) {
2980
+ op := ptrFromHandle_api_SourceLocation(handle)
2981
+ op.Line = int(val)
2982
+ }
2983
+
2984
+ //export api_SourceLocation_Column_Get
2985
+ func api_SourceLocation_Column_Get(handle CGoHandle) C.longlong {
2986
+ op := ptrFromHandle_api_SourceLocation(handle)
2987
+ return C.longlong(op.Column)
2988
+ }
2989
+
2990
+ //export api_SourceLocation_Column_Set
2991
+ func api_SourceLocation_Column_Set(handle CGoHandle, val C.longlong) {
2992
+ op := ptrFromHandle_api_SourceLocation(handle)
2993
+ op.Column = int(val)
2994
+ }
2995
+
2996
+ // --- wrapping struct: api.VMError ---
2997
+ //
2998
+ //export api_VMError_CTor
2999
+ func api_VMError_CTor() CGoHandle {
3000
+ return CGoHandle(handleFromPtr_api_VMError(&api.VMError{}))
3001
+ }
3002
+
3003
+ //export api_VMError_Type_Get
3004
+ func api_VMError_Type_Get(handle CGoHandle) *C.char {
3005
+ op := ptrFromHandle_api_VMError(handle)
3006
+ return C.CString(string(op.Type))
3007
+ }
3008
+
3009
+ //export api_VMError_Type_Set
3010
+ func api_VMError_Type_Set(handle CGoHandle, val *C.char) {
3011
+ op := ptrFromHandle_api_VMError(handle)
3012
+ op.Type = api.ErrorType(C.GoString(val))
3013
+ }
3014
+
3015
+ //export api_VMError_Message_Get
3016
+ func api_VMError_Message_Get(handle CGoHandle) *C.char {
3017
+ op := ptrFromHandle_api_VMError(handle)
3018
+ return C.CString(op.Message)
3019
+ }
3020
+
3021
+ //export api_VMError_Message_Set
3022
+ func api_VMError_Message_Set(handle CGoHandle, val *C.char) {
3023
+ op := ptrFromHandle_api_VMError(handle)
3024
+ op.Message = C.GoString(val)
3025
+ }
3026
+
3027
+ //export api_VMError_Source_Get
3028
+ func api_VMError_Source_Get(handle CGoHandle) CGoHandle {
3029
+ op := ptrFromHandle_api_VMError(handle)
3030
+ return handleFromPtr_Ptr_api_SourceLocation(op.Source)
3031
+ }
3032
+
3033
+ //export api_VMError_Source_Set
3034
+ func api_VMError_Source_Set(handle CGoHandle, val CGoHandle) {
3035
+ op := ptrFromHandle_api_VMError(handle)
3036
+ op.Source = ptrFromHandle_Ptr_api_SourceLocation(val)
3037
+ }
3038
+
3039
+ //export api_VMError_Duration_Get
3040
+ func api_VMError_Duration_Get(handle CGoHandle) C.longlong {
3041
+ op := ptrFromHandle_api_VMError(handle)
3042
+ return C.longlong(int64(op.Duration))
3043
+ }
3044
+
3045
+ //export api_VMError_Duration_Set
3046
+ func api_VMError_Duration_Set(handle CGoHandle, val C.longlong) {
3047
+ op := ptrFromHandle_api_VMError(handle)
3048
+ op.Duration = time.Duration(int64(val))
3049
+ }
3050
+
3051
+ //export api_VMError_Error
3052
+ func api_VMError_Error(_handle CGoHandle) *C.char {
3053
+ _saved_thread := C.PyEval_SaveThread()
3054
+ defer C.PyEval_RestoreThread(_saved_thread)
3055
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
3056
+ if __err != nil {
3057
+ return C.CString("")
3058
+ }
3059
+ return C.CString(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).Error())
3060
+
3061
+ }
3062
+
3063
+ //export api_VMError_Unwrap
3064
+ func api_VMError_Unwrap(_handle CGoHandle) *C.char {
3065
+ _saved_thread := C.PyEval_SaveThread()
3066
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
3067
+ if __err != nil {
3068
+ return errorGoToPy(nil)
3069
+ }
3070
+ __err = gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).Unwrap()
3071
+
3072
+ C.PyEval_RestoreThread(_saved_thread)
3073
+ if __err != nil {
3074
+ estr := C.CString(__err.Error())
3075
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3076
+ return estr
3077
+ }
3078
+ return C.CString("")
3079
+ }
3080
+
3081
+ //export api_VMError_IsCompileError
3082
+ func api_VMError_IsCompileError(_handle CGoHandle) C.char {
3083
+ _saved_thread := C.PyEval_SaveThread()
3084
+ defer C.PyEval_RestoreThread(_saved_thread)
3085
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
3086
+ if __err != nil {
3087
+ return boolGoToPy(false)
3088
+ }
3089
+ return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsCompileError())
3090
+
3091
+ }
3092
+
3093
+ //export api_VMError_IsRuntimeError
3094
+ func api_VMError_IsRuntimeError(_handle CGoHandle) C.char {
3095
+ _saved_thread := C.PyEval_SaveThread()
3096
+ defer C.PyEval_RestoreThread(_saved_thread)
3097
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
3098
+ if __err != nil {
3099
+ return boolGoToPy(false)
3100
+ }
3101
+ return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsRuntimeError())
3102
+
3103
+ }
3104
+
3105
+ //export api_VMError_IsTimeoutError
3106
+ func api_VMError_IsTimeoutError(_handle CGoHandle) C.char {
3107
+ _saved_thread := C.PyEval_SaveThread()
3108
+ defer C.PyEval_RestoreThread(_saved_thread)
3109
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
3110
+ if __err != nil {
3111
+ return boolGoToPy(false)
3112
+ }
3113
+ return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsTimeoutError())
3114
+
3115
+ }
3116
+
3117
+ //export api_VMError_IsConversionError
3118
+ func api_VMError_IsConversionError(_handle CGoHandle) C.char {
3119
+ _saved_thread := C.PyEval_SaveThread()
3120
+ defer C.PyEval_RestoreThread(_saved_thread)
3121
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
3122
+ if __err != nil {
3123
+ return boolGoToPy(false)
3124
+ }
3125
+ return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsConversionError())
3126
+
3127
+ }
3128
+
3129
+ //export api_VMError_IsConfigError
3130
+ func api_VMError_IsConfigError(_handle CGoHandle) C.char {
3131
+ _saved_thread := C.PyEval_SaveThread()
3132
+ defer C.PyEval_RestoreThread(_saved_thread)
3133
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
3134
+ if __err != nil {
3135
+ return boolGoToPy(false)
3136
+ }
3137
+ return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsConfigError())
3138
+
3139
+ }
3140
+
3141
+ // --- wrapping struct: api.ClassVariable ---
3142
+ //
3143
+ //export api_ClassVariable_CTor
3144
+ func api_ClassVariable_CTor() CGoHandle {
3145
+ return CGoHandle(handleFromPtr_api_ClassVariable(&api.ClassVariable{}))
3146
+ }
3147
+
3148
+ //export api_ClassVariable_Name_Get
3149
+ func api_ClassVariable_Name_Get(handle CGoHandle) *C.char {
3150
+ op := ptrFromHandle_api_ClassVariable(handle)
3151
+ return C.CString(op.Name)
3152
+ }
3153
+
3154
+ //export api_ClassVariable_Name_Set
3155
+ func api_ClassVariable_Name_Set(handle CGoHandle, val *C.char) {
3156
+ op := ptrFromHandle_api_ClassVariable(handle)
3157
+ op.Name = C.GoString(val)
3158
+ }
3159
+
3160
+ //export api_ClassVariable_Value_Get
3161
+ func api_ClassVariable_Value_Get(handle CGoHandle) CGoHandle {
3162
+ op := ptrFromHandle_api_ClassVariable(handle)
3163
+ return handleFromPtr_api_GoValue(&op.Value)
3164
+ }
3165
+
3166
+ //export api_ClassVariable_Value_Set
3167
+ func api_ClassVariable_Value_Set(handle CGoHandle, val CGoHandle) {
3168
+ op := ptrFromHandle_api_ClassVariable(handle)
3169
+ op.Value = *ptrFromHandle_api_GoValue(val)
3170
+ }
3171
+
3172
+ //export api_ClassVariable_Locked_Get
3173
+ func api_ClassVariable_Locked_Get(handle CGoHandle) C.char {
3174
+ op := ptrFromHandle_api_ClassVariable(handle)
3175
+ return boolGoToPy(op.Locked)
3176
+ }
3177
+
3178
+ //export api_ClassVariable_Locked_Set
3179
+ func api_ClassVariable_Locked_Set(handle CGoHandle, val C.char) {
3180
+ op := ptrFromHandle_api_ClassVariable(handle)
3181
+ op.Locked = boolPyToGo(val)
3182
+ }
3183
+
3184
+ // --- wrapping struct: api.VM ---
3185
+ //
3186
+ //export api_VM_CTor
3187
+ func api_VM_CTor() CGoHandle {
3188
+ return CGoHandle(handleFromPtr_api_VM(&api.VM{}))
3189
+ }
3190
+
3191
+ //export api_VM_GetCompatibilityShim
3192
+ func api_VM_GetCompatibilityShim(_handle CGoHandle) CGoHandle {
3193
+ _saved_thread := C.PyEval_SaveThread()
3194
+ defer C.PyEval_RestoreThread(_saved_thread)
3195
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
3196
+ if __err != nil {
3197
+ return handleFromPtr_Ptr_api_VMCompatibilityShim(nil)
3198
+ }
3199
+ return handleFromPtr_Ptr_api_VMCompatibilityShim(gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).GetCompatibilityShim())
3200
+
3201
+ }
3202
+
3203
+ //export api_VM_Execute
3204
+ func api_VM_Execute(_handle CGoHandle, code *C.char) CGoHandle {
3205
+ _saved_thread := C.PyEval_SaveThread()
3206
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
3207
+ if __err != nil {
3208
+ return handleFromPtr_Ptr_api_ExecutionResult(nil)
3209
+ }
3210
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).Execute(C.GoString(code))
3211
+
3212
+ C.PyEval_RestoreThread(_saved_thread)
3213
+ if __err != nil {
3214
+ estr := C.CString(__err.Error())
3215
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3216
+ C.free(unsafe.Pointer(estr))
3217
+ return handleFromPtr_Ptr_api_ExecutionResult(nil)
3218
+ }
3219
+ return handleFromPtr_Ptr_api_ExecutionResult(cret)
3220
+ }
3221
+
3222
+ //export api_VM_ExecuteWithContext
3223
+ func api_VM_ExecuteWithContext(_handle CGoHandle, ctx CGoHandle, code *C.char) CGoHandle {
3224
+ _saved_thread := C.PyEval_SaveThread()
3225
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
3226
+ if __err != nil {
3227
+ return handleFromPtr_Ptr_api_ExecutionResult(nil)
3228
+ }
3229
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).ExecuteWithContext(ptrFromHandle_context_Context(ctx), C.GoString(code))
3230
+
3231
+ C.PyEval_RestoreThread(_saved_thread)
3232
+ if __err != nil {
3233
+ estr := C.CString(__err.Error())
3234
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3235
+ C.free(unsafe.Pointer(estr))
3236
+ return handleFromPtr_Ptr_api_ExecutionResult(nil)
3237
+ }
3238
+ return handleFromPtr_Ptr_api_ExecutionResult(cret)
3239
+ }
3240
+
3241
+ //export api_VM_NewObjectInstance
3242
+ func api_VM_NewObjectInstance(_handle CGoHandle, className *C.char) CGoHandle {
3243
+ _saved_thread := C.PyEval_SaveThread()
3244
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
3245
+ if __err != nil {
3246
+ return handleFromPtr_api_GoValue(nil)
3247
+ }
3248
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).NewObjectInstance(C.GoString(className))
3249
+
3250
+ C.PyEval_RestoreThread(_saved_thread)
3251
+ if __err != nil {
3252
+ estr := C.CString(__err.Error())
3253
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3254
+ C.free(unsafe.Pointer(estr))
3255
+ return handleFromPtr_api_GoValue(nil)
3256
+ }
3257
+ return handleFromPtr_api_GoValue(&cret)
3258
+ }
3259
+
3260
+ //export api_VM_Call
3261
+ func api_VM_Call(_handle CGoHandle, functionName *C.char, args CGoHandle) CGoHandle {
3262
+ _saved_thread := C.PyEval_SaveThread()
3263
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
3264
+ if __err != nil {
3265
+ return handleFromPtr_api_GoValue(nil)
3266
+ }
3267
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).Call(C.GoString(functionName), deptrFromHandle_Slice_api_GoValue(args))
3268
+
3269
+ C.PyEval_RestoreThread(_saved_thread)
3270
+ if __err != nil {
3271
+ estr := C.CString(__err.Error())
3272
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3273
+ C.free(unsafe.Pointer(estr))
3274
+ return handleFromPtr_api_GoValue(nil)
3275
+ }
3276
+ return handleFromPtr_api_GoValue(&cret)
3277
+ }
3278
+
3279
+ //export api_VM_CallMethod
3280
+ func api_VM_CallMethod(_handle CGoHandle, object CGoHandle, methodName *C.char, args CGoHandle) CGoHandle {
3281
+ _saved_thread := C.PyEval_SaveThread()
3282
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
3283
+ if __err != nil {
3284
+ return handleFromPtr_api_GoValue(nil)
3285
+ }
3286
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).CallMethod(*ptrFromHandle_api_GoValue(object), C.GoString(methodName), deptrFromHandle_Slice_api_GoValue(args))
3287
+
3288
+ C.PyEval_RestoreThread(_saved_thread)
3289
+ if __err != nil {
3290
+ estr := C.CString(__err.Error())
3291
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3292
+ C.free(unsafe.Pointer(estr))
3293
+ return handleFromPtr_api_GoValue(nil)
3294
+ }
3295
+ return handleFromPtr_api_GoValue(&cret)
3296
+ }
3297
+
3298
+ //export api_VM_DefineVariable
3299
+ func api_VM_DefineVariable(_handle CGoHandle, name *C.char, value CGoHandle, constant C.char) *C.char {
3300
+ _saved_thread := C.PyEval_SaveThread()
3301
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
3302
+ if __err != nil {
3303
+ return errorGoToPy(nil)
3304
+ }
3305
+ __err = gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).DefineVariable(C.GoString(name), *ptrFromHandle_api_GoValue(value), boolPyToGo(constant))
3306
+
3307
+ C.PyEval_RestoreThread(_saved_thread)
3308
+ if __err != nil {
3309
+ estr := C.CString(__err.Error())
3310
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3311
+ return estr
3312
+ }
3313
+ return C.CString("")
3314
+ }
3315
+
3316
+ //export api_VM_SetVariable
3317
+ func api_VM_SetVariable(_handle CGoHandle, variableName *C.char, value CGoHandle) *C.char {
3318
+ _saved_thread := C.PyEval_SaveThread()
3319
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
3320
+ if __err != nil {
3321
+ return errorGoToPy(nil)
3322
+ }
3323
+ __err = gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).SetVariable(C.GoString(variableName), *ptrFromHandle_api_GoValue(value))
3324
+
3325
+ C.PyEval_RestoreThread(_saved_thread)
3326
+ if __err != nil {
3327
+ estr := C.CString(__err.Error())
3328
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3329
+ return estr
3330
+ }
3331
+ return C.CString("")
3332
+ }
3333
+
3334
+ //export api_VM_GetVariable
3335
+ func api_VM_GetVariable(_handle CGoHandle, variableName *C.char) CGoHandle {
3336
+ _saved_thread := C.PyEval_SaveThread()
3337
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
3338
+ if __err != nil {
3339
+ return handleFromPtr_api_GoValue(nil)
3340
+ }
3341
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).GetVariable(C.GoString(variableName))
3342
+
3343
+ C.PyEval_RestoreThread(_saved_thread)
3344
+ if __err != nil {
3345
+ estr := C.CString(__err.Error())
3346
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3347
+ C.free(unsafe.Pointer(estr))
3348
+ return handleFromPtr_api_GoValue(nil)
3349
+ }
3350
+ return handleFromPtr_api_GoValue(&cret)
3351
+ }
3352
+
3353
+ //export api_VM_DefineClass
3354
+ func api_VM_DefineClass(_handle CGoHandle, classDef CGoHandle) *C.char {
3355
+ _saved_thread := C.PyEval_SaveThread()
3356
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
3357
+ if __err != nil {
3358
+ return errorGoToPy(nil)
3359
+ }
3360
+ __err = gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).DefineClass(ptrFromHandle_Ptr_api_ClassDefinition(classDef))
3361
+
3362
+ C.PyEval_RestoreThread(_saved_thread)
3363
+ if __err != nil {
3364
+ estr := C.CString(__err.Error())
3365
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3366
+ return estr
3367
+ }
3368
+ return C.CString("")
3369
+ }
3370
+
3371
+ // ---- Slices ---
3372
+
3373
+ // ---- Maps ---
3374
+
3375
+ // ---- Constructors ---
3376
+
3377
+ //export api_DefaultConfig
3378
+ func api_DefaultConfig() CGoHandle {
3379
+ _saved_thread := C.PyEval_SaveThread()
3380
+ defer C.PyEval_RestoreThread(_saved_thread)
3381
+ return handleFromPtr_Ptr_api_VMConfig(api.DefaultConfig())
3382
+
3383
+ }
3384
+
3385
+ //export api_NewClassDefinition
3386
+ func api_NewClassDefinition() CGoHandle {
3387
+ _saved_thread := C.PyEval_SaveThread()
3388
+ defer C.PyEval_RestoreThread(_saved_thread)
3389
+ return handleFromPtr_Ptr_api_ClassDefinition(api.NewClassDefinition())
3390
+
3391
+ }
3392
+
3393
+ //export api_WrapAny
3394
+ func api_WrapAny(value *C.char) CGoHandle {
3395
+ _saved_thread := C.PyEval_SaveThread()
3396
+ defer C.PyEval_RestoreThread(_saved_thread)
3397
+ cret := api.WrapAny(C.GoString(value))
3398
+
3399
+ return handleFromPtr_api_GoValue(&cret)
3400
+ }
3401
+
3402
+ //export api_WrapObject
3403
+ func api_WrapObject(value CGoHandle) CGoHandle {
3404
+ _saved_thread := C.PyEval_SaveThread()
3405
+ defer C.PyEval_RestoreThread(_saved_thread)
3406
+ cret := api.WrapObject(ptrFromHandle_Ptr_environment_ObjectInstance(value))
3407
+
3408
+ return handleFromPtr_api_GoValue(&cret)
3409
+ }
3410
+
3411
+ //export api_WrapBool
3412
+ func api_WrapBool(value C.char) CGoHandle {
3413
+ _saved_thread := C.PyEval_SaveThread()
3414
+ defer C.PyEval_RestoreThread(_saved_thread)
3415
+ cret := api.WrapBool(boolPyToGo(value))
3416
+
3417
+ return handleFromPtr_api_GoValue(&cret)
3418
+ }
3419
+
3420
+ //export api_WrapFloat
3421
+ func api_WrapFloat(value C.double) CGoHandle {
3422
+ _saved_thread := C.PyEval_SaveThread()
3423
+ defer C.PyEval_RestoreThread(_saved_thread)
3424
+ cret := api.WrapFloat(float64(value))
3425
+
3426
+ return handleFromPtr_api_GoValue(&cret)
3427
+ }
3428
+
3429
+ //export api_WrapInt
3430
+ func api_WrapInt(value C.longlong) CGoHandle {
3431
+ _saved_thread := C.PyEval_SaveThread()
3432
+ defer C.PyEval_RestoreThread(_saved_thread)
3433
+ cret := api.WrapInt(int64(value))
3434
+
3435
+ return handleFromPtr_api_GoValue(&cret)
3436
+ }
3437
+
3438
+ //export api_ToGoValue
3439
+ func api_ToGoValue(val CGoHandle) CGoHandle {
3440
+ _saved_thread := C.PyEval_SaveThread()
3441
+ cret, __err := api.ToGoValue(ptrFromHandle_environment_Value(val))
3442
+
3443
+ C.PyEval_RestoreThread(_saved_thread)
3444
+ if __err != nil {
3445
+ estr := C.CString(__err.Error())
3446
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3447
+ C.free(unsafe.Pointer(estr))
3448
+ return handleFromPtr_api_GoValue(nil)
3449
+ }
3450
+ return handleFromPtr_api_GoValue(&cret)
3451
+ }
3452
+
3453
+ //export api_WrapString
3454
+ func api_WrapString(value *C.char) CGoHandle {
3455
+ _saved_thread := C.PyEval_SaveThread()
3456
+ defer C.PyEval_RestoreThread(_saved_thread)
3457
+ cret := api.WrapString(C.GoString(value))
3458
+
3459
+ return handleFromPtr_api_GoValue(&cret)
3460
+ }
3461
+
3462
+ //export api_NewTimeoutError
3463
+ func api_NewTimeoutError(duration C.longlong) CGoHandle {
3464
+ _saved_thread := C.PyEval_SaveThread()
3465
+ defer C.PyEval_RestoreThread(_saved_thread)
3466
+ return handleFromPtr_Ptr_api_VMError(api.NewTimeoutError(time.Duration(int64(duration))))
3467
+
3468
+ }
3469
+
3470
+ //export api_NewRuntimeError
3471
+ func api_NewRuntimeError(message *C.char, source CGoHandle) CGoHandle {
3472
+ _saved_thread := C.PyEval_SaveThread()
3473
+ defer C.PyEval_RestoreThread(_saved_thread)
3474
+ return handleFromPtr_Ptr_api_VMError(api.NewRuntimeError(C.GoString(message), ptrFromHandle_Ptr_api_SourceLocation(source)))
3475
+
3476
+ }
3477
+
3478
+ //export api_NewCompileError
3479
+ func api_NewCompileError(message *C.char, source CGoHandle) CGoHandle {
3480
+ _saved_thread := C.PyEval_SaveThread()
3481
+ defer C.PyEval_RestoreThread(_saved_thread)
3482
+ return handleFromPtr_Ptr_api_VMError(api.NewCompileError(C.GoString(message), ptrFromHandle_Ptr_api_SourceLocation(source)))
3483
+
3484
+ }
3485
+
3486
+ //export api_NewConfigError
3487
+ func api_NewConfigError(message *C.char, wrapped *C.char) CGoHandle {
3488
+ _saved_thread := C.PyEval_SaveThread()
3489
+ defer C.PyEval_RestoreThread(_saved_thread)
3490
+ return handleFromPtr_Ptr_api_VMError(api.NewConfigError(C.GoString(message), errors.New(C.GoString(wrapped))))
3491
+
3492
+ }
3493
+
3494
+ //export api_NewConversionError
3495
+ func api_NewConversionError(message *C.char, wrapped *C.char) CGoHandle {
3496
+ _saved_thread := C.PyEval_SaveThread()
3497
+ defer C.PyEval_RestoreThread(_saved_thread)
3498
+ return handleFromPtr_Ptr_api_VMError(api.NewConversionError(C.GoString(message), errors.New(C.GoString(wrapped))))
3499
+
3500
+ }
3501
+
3502
+ //export api_NewVM
3503
+ func api_NewVM(config CGoHandle) CGoHandle {
3504
+ _saved_thread := C.PyEval_SaveThread()
3505
+ cret, __err := api.NewVM(ptrFromHandle_Ptr_api_VMConfig(config))
3506
+
3507
+ C.PyEval_RestoreThread(_saved_thread)
3508
+ if __err != nil {
3509
+ estr := C.CString(__err.Error())
3510
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3511
+ C.free(unsafe.Pointer(estr))
3512
+ return handleFromPtr_Ptr_api_VM(nil)
3513
+ }
3514
+ return handleFromPtr_Ptr_api_VM(cret)
3515
+ }
3516
+
3517
+ // ---- Functions ---
3518
+
3519
+ //export api_ConvertArguments
3520
+ func api_ConvertArguments(args CGoHandle) CGoHandle {
3521
+ _saved_thread := C.PyEval_SaveThread()
3522
+ cret, __err := api.ConvertArguments(deptrFromHandle_Slice_api_GoValue(args))
3523
+
3524
+ C.PyEval_RestoreThread(_saved_thread)
3525
+ if __err != nil {
3526
+ estr := C.CString(__err.Error())
3527
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3528
+ C.free(unsafe.Pointer(estr))
3529
+ return handleFromPtr_Slice_environment_Value(nil)
3530
+ }
3531
+ return handleFromPtr_Slice_environment_Value(&cret)
3532
+ }
3533
+
3534
+ //export api_FromGoValue
3535
+ func api_FromGoValue(val CGoHandle) CGoHandle {
3536
+ _saved_thread := C.PyEval_SaveThread()
3537
+ cret, __err := api.FromGoValue(*ptrFromHandle_api_GoValue(val))
3538
+
3539
+ C.PyEval_RestoreThread(_saved_thread)
3540
+ if __err != nil {
3541
+ estr := C.CString(__err.Error())
3542
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3543
+ C.free(unsafe.Pointer(estr))
3544
+ return handleFromPtr_environment_Value(nil)
3545
+ }
3546
+ return handleFromPtr_environment_Value(cret)
3547
+ }
3548
+
3549
+ //export api_LookupObject
3550
+ func api_LookupObject(id *C.char) CGoHandle {
3551
+ _saved_thread := C.PyEval_SaveThread()
3552
+ cret, __err := api.LookupObject(C.GoString(id))
3553
+
3554
+ C.PyEval_RestoreThread(_saved_thread)
3555
+ if __err != nil {
3556
+ estr := C.CString(__err.Error())
3557
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3558
+ C.free(unsafe.Pointer(estr))
3559
+ return handleFromPtr_Ptr_environment_ObjectInstance(nil)
3560
+ }
3561
+ return handleFromPtr_Ptr_environment_ObjectInstance(cret)
3562
+ }