objective-lol 0.0.1__cp39-cp39-win_amd64.whl → 0.0.2__cp39-cp39-win_amd64.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 CHANGED
@@ -2272,733 +2272,850 @@ func Map_string_api_GoValue_keys(handle CGoHandle) CGoHandle {
2272
2272
 
2273
2273
  // ---- Structs ---
2274
2274
 
2275
- // --- wrapping struct: api.VMConfig ---
2275
+ // --- wrapping struct: api.GoValue ---
2276
2276
  //
2277
- //export api_VMConfig_CTor
2278
- func api_VMConfig_CTor() CGoHandle {
2279
- return CGoHandle(handleFromPtr_api_VMConfig(&api.VMConfig{}))
2280
- }
2281
-
2282
- //export api_VMConfig_Stdout_Get
2283
- func api_VMConfig_Stdout_Get(handle CGoHandle) CGoHandle {
2284
- op := ptrFromHandle_api_VMConfig(handle)
2285
- return handleFromPtr_io_Writer(op.Stdout)
2286
- }
2287
-
2288
- //export api_VMConfig_Stdout_Set
2289
- func api_VMConfig_Stdout_Set(handle CGoHandle, val CGoHandle) {
2290
- op := ptrFromHandle_api_VMConfig(handle)
2291
- op.Stdout = ptrFromHandle_io_Writer(val)
2292
- }
2293
-
2294
- //export api_VMConfig_Stdin_Get
2295
- func api_VMConfig_Stdin_Get(handle CGoHandle) CGoHandle {
2296
- op := ptrFromHandle_api_VMConfig(handle)
2297
- return handleFromPtr_io_Reader(op.Stdin)
2298
- }
2299
-
2300
- //export api_VMConfig_Stdin_Set
2301
- func api_VMConfig_Stdin_Set(handle CGoHandle, val CGoHandle) {
2302
- op := ptrFromHandle_api_VMConfig(handle)
2303
- op.Stdin = ptrFromHandle_io_Reader(val)
2304
- }
2305
-
2306
- //export api_VMConfig_Timeout_Get
2307
- func api_VMConfig_Timeout_Get(handle CGoHandle) C.longlong {
2308
- op := ptrFromHandle_api_VMConfig(handle)
2309
- return C.longlong(int64(op.Timeout))
2310
- }
2311
-
2312
- //export api_VMConfig_Timeout_Set
2313
- func api_VMConfig_Timeout_Set(handle CGoHandle, val C.longlong) {
2314
- op := ptrFromHandle_api_VMConfig(handle)
2315
- op.Timeout = time.Duration(int64(val))
2277
+ //export api_GoValue_CTor
2278
+ func api_GoValue_CTor() CGoHandle {
2279
+ return CGoHandle(handleFromPtr_api_GoValue(&api.GoValue{}))
2316
2280
  }
2317
2281
 
2318
- //export api_VMConfig_WorkingDirectory_Get
2319
- func api_VMConfig_WorkingDirectory_Get(handle CGoHandle) *C.char {
2320
- op := ptrFromHandle_api_VMConfig(handle)
2321
- return C.CString(op.WorkingDirectory)
2322
- }
2282
+ //export api_GoValue_ID
2283
+ func api_GoValue_ID(_handle CGoHandle) *C.char {
2284
+ _saved_thread := C.PyEval_SaveThread()
2285
+ defer C.PyEval_RestoreThread(_saved_thread)
2286
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2287
+ if __err != nil {
2288
+ return C.CString("")
2289
+ }
2290
+ return C.CString(gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).ID())
2323
2291
 
2324
- //export api_VMConfig_WorkingDirectory_Set
2325
- func api_VMConfig_WorkingDirectory_Set(handle CGoHandle, val *C.char) {
2326
- op := ptrFromHandle_api_VMConfig(handle)
2327
- op.WorkingDirectory = C.GoString(val)
2328
2292
  }
2329
2293
 
2330
- //export api_VMConfig_Validate
2331
- func api_VMConfig_Validate(_handle CGoHandle) *C.char {
2294
+ //export api_GoValue_MarshalJSON
2295
+ func api_GoValue_MarshalJSON(_handle CGoHandle) CGoHandle {
2332
2296
  _saved_thread := C.PyEval_SaveThread()
2333
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMConfig")
2297
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2334
2298
  if __err != nil {
2335
- return errorGoToPy(nil)
2299
+ return handleFromPtr_Slice_byte(nil)
2336
2300
  }
2337
- __err = gopyh.Embed(vifc, reflect.TypeOf(api.VMConfig{})).(*api.VMConfig).Validate()
2301
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).MarshalJSON()
2338
2302
 
2339
2303
  C.PyEval_RestoreThread(_saved_thread)
2340
2304
  if __err != nil {
2341
2305
  estr := C.CString(__err.Error())
2342
2306
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2343
- return estr
2307
+ C.free(unsafe.Pointer(estr))
2308
+ return handleFromPtr_Slice_byte(nil)
2344
2309
  }
2345
- return C.CString("")
2346
- }
2347
-
2348
- // --- wrapping struct: api.VMError ---
2349
- //
2350
- //export api_VMError_CTor
2351
- func api_VMError_CTor() CGoHandle {
2352
- return CGoHandle(handleFromPtr_api_VMError(&api.VMError{}))
2353
- }
2354
-
2355
- //export api_VMError_Type_Get
2356
- func api_VMError_Type_Get(handle CGoHandle) *C.char {
2357
- op := ptrFromHandle_api_VMError(handle)
2358
- return C.CString(string(op.Type))
2359
- }
2360
-
2361
- //export api_VMError_Type_Set
2362
- func api_VMError_Type_Set(handle CGoHandle, val *C.char) {
2363
- op := ptrFromHandle_api_VMError(handle)
2364
- op.Type = api.ErrorType(C.GoString(val))
2365
- }
2366
-
2367
- //export api_VMError_Message_Get
2368
- func api_VMError_Message_Get(handle CGoHandle) *C.char {
2369
- op := ptrFromHandle_api_VMError(handle)
2370
- return C.CString(op.Message)
2371
- }
2372
-
2373
- //export api_VMError_Message_Set
2374
- func api_VMError_Message_Set(handle CGoHandle, val *C.char) {
2375
- op := ptrFromHandle_api_VMError(handle)
2376
- op.Message = C.GoString(val)
2377
- }
2378
-
2379
- //export api_VMError_Source_Get
2380
- func api_VMError_Source_Get(handle CGoHandle) CGoHandle {
2381
- op := ptrFromHandle_api_VMError(handle)
2382
- return handleFromPtr_Ptr_api_SourceLocation(op.Source)
2383
- }
2384
-
2385
- //export api_VMError_Source_Set
2386
- func api_VMError_Source_Set(handle CGoHandle, val CGoHandle) {
2387
- op := ptrFromHandle_api_VMError(handle)
2388
- op.Source = ptrFromHandle_Ptr_api_SourceLocation(val)
2389
- }
2390
-
2391
- //export api_VMError_Duration_Get
2392
- func api_VMError_Duration_Get(handle CGoHandle) C.longlong {
2393
- op := ptrFromHandle_api_VMError(handle)
2394
- return C.longlong(int64(op.Duration))
2395
- }
2396
-
2397
- //export api_VMError_Duration_Set
2398
- func api_VMError_Duration_Set(handle CGoHandle, val C.longlong) {
2399
- op := ptrFromHandle_api_VMError(handle)
2400
- op.Duration = time.Duration(int64(val))
2310
+ return handleFromPtr_Slice_byte(&cret)
2401
2311
  }
2402
2312
 
2403
- //export api_VMError_Error
2404
- func api_VMError_Error(_handle CGoHandle) *C.char {
2313
+ //export api_GoValue_Type
2314
+ func api_GoValue_Type(_handle CGoHandle) *C.char {
2405
2315
  _saved_thread := C.PyEval_SaveThread()
2406
2316
  defer C.PyEval_RestoreThread(_saved_thread)
2407
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2317
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2408
2318
  if __err != nil {
2409
2319
  return C.CString("")
2410
2320
  }
2411
- return C.CString(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).Error())
2321
+ return C.CString(gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Type())
2412
2322
 
2413
2323
  }
2414
2324
 
2415
- //export api_VMError_Unwrap
2416
- func api_VMError_Unwrap(_handle CGoHandle) *C.char {
2325
+ //export api_GoValue_Int
2326
+ func api_GoValue_Int(_handle CGoHandle) C.longlong {
2417
2327
  _saved_thread := C.PyEval_SaveThread()
2418
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2328
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2419
2329
  if __err != nil {
2420
- return errorGoToPy(nil)
2330
+ return C.longlong(0)
2421
2331
  }
2422
- __err = gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).Unwrap()
2332
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Int()
2423
2333
 
2424
2334
  C.PyEval_RestoreThread(_saved_thread)
2425
2335
  if __err != nil {
2426
2336
  estr := C.CString(__err.Error())
2427
2337
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2428
- return estr
2338
+ C.free(unsafe.Pointer(estr))
2339
+ return C.longlong(0)
2429
2340
  }
2430
- return C.CString("")
2341
+ return C.longlong(cret)
2431
2342
  }
2432
2343
 
2433
- //export api_VMError_IsCompileError
2434
- func api_VMError_IsCompileError(_handle CGoHandle) C.char {
2344
+ //export api_GoValue_Float
2345
+ func api_GoValue_Float(_handle CGoHandle) C.double {
2435
2346
  _saved_thread := C.PyEval_SaveThread()
2436
- defer C.PyEval_RestoreThread(_saved_thread)
2437
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2347
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2438
2348
  if __err != nil {
2439
- return boolGoToPy(false)
2349
+ return C.double(0)
2440
2350
  }
2441
- return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsCompileError())
2351
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Float()
2442
2352
 
2353
+ C.PyEval_RestoreThread(_saved_thread)
2354
+ if __err != nil {
2355
+ estr := C.CString(__err.Error())
2356
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2357
+ C.free(unsafe.Pointer(estr))
2358
+ return C.double(0)
2359
+ }
2360
+ return C.double(cret)
2443
2361
  }
2444
2362
 
2445
- //export api_VMError_IsRuntimeError
2446
- func api_VMError_IsRuntimeError(_handle CGoHandle) C.char {
2363
+ //export api_GoValue_String
2364
+ func api_GoValue_String(_handle CGoHandle) *C.char {
2447
2365
  _saved_thread := C.PyEval_SaveThread()
2448
- defer C.PyEval_RestoreThread(_saved_thread)
2449
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2366
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2450
2367
  if __err != nil {
2451
- return boolGoToPy(false)
2368
+ return C.CString("")
2452
2369
  }
2453
- return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsRuntimeError())
2370
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).String()
2454
2371
 
2372
+ C.PyEval_RestoreThread(_saved_thread)
2373
+ if __err != nil {
2374
+ estr := C.CString(__err.Error())
2375
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2376
+ C.free(unsafe.Pointer(estr))
2377
+ return C.CString("")
2378
+ }
2379
+ return C.CString(cret)
2455
2380
  }
2456
2381
 
2457
- //export api_VMError_IsTimeoutError
2458
- func api_VMError_IsTimeoutError(_handle CGoHandle) C.char {
2382
+ //export api_GoValue_Bool
2383
+ func api_GoValue_Bool(_handle CGoHandle) C.char {
2459
2384
  _saved_thread := C.PyEval_SaveThread()
2460
- defer C.PyEval_RestoreThread(_saved_thread)
2461
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2385
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2462
2386
  if __err != nil {
2463
2387
  return boolGoToPy(false)
2464
2388
  }
2465
- return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsTimeoutError())
2389
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Bool()
2466
2390
 
2391
+ C.PyEval_RestoreThread(_saved_thread)
2392
+ if __err != nil {
2393
+ estr := C.CString(__err.Error())
2394
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2395
+ C.free(unsafe.Pointer(estr))
2396
+ return boolGoToPy(false)
2397
+ }
2398
+ return boolGoToPy(cret)
2467
2399
  }
2468
2400
 
2469
- //export api_VMError_IsConversionError
2470
- func api_VMError_IsConversionError(_handle CGoHandle) C.char {
2401
+ //export api_GoValue_Slice
2402
+ func api_GoValue_Slice(_handle CGoHandle) CGoHandle {
2471
2403
  _saved_thread := C.PyEval_SaveThread()
2472
- defer C.PyEval_RestoreThread(_saved_thread)
2473
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2404
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2474
2405
  if __err != nil {
2475
- return boolGoToPy(false)
2406
+ return handleFromPtr_Slice_api_GoValue(nil)
2476
2407
  }
2477
- return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsConversionError())
2408
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Slice()
2478
2409
 
2410
+ C.PyEval_RestoreThread(_saved_thread)
2411
+ if __err != nil {
2412
+ estr := C.CString(__err.Error())
2413
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2414
+ C.free(unsafe.Pointer(estr))
2415
+ return handleFromPtr_Slice_api_GoValue(nil)
2416
+ }
2417
+ return handleFromPtr_Slice_api_GoValue(&cret)
2479
2418
  }
2480
2419
 
2481
- //export api_VMError_IsConfigError
2482
- func api_VMError_IsConfigError(_handle CGoHandle) C.char {
2420
+ //export api_GoValue_Map
2421
+ func api_GoValue_Map(_handle CGoHandle) CGoHandle {
2483
2422
  _saved_thread := C.PyEval_SaveThread()
2484
- defer C.PyEval_RestoreThread(_saved_thread)
2485
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2423
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2486
2424
  if __err != nil {
2487
- return boolGoToPy(false)
2425
+ return handleFromPtr_Map_string_api_GoValue(nil)
2488
2426
  }
2489
- return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsConfigError())
2490
-
2491
- }
2427
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Map()
2492
2428
 
2493
- // --- wrapping struct: api.ClassDefinition ---
2494
- //
2495
- //export api_ClassDefinition_CTor
2496
- func api_ClassDefinition_CTor() CGoHandle {
2497
- return CGoHandle(handleFromPtr_api_ClassDefinition(&api.ClassDefinition{}))
2429
+ C.PyEval_RestoreThread(_saved_thread)
2430
+ if __err != nil {
2431
+ estr := C.CString(__err.Error())
2432
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2433
+ C.free(unsafe.Pointer(estr))
2434
+ return handleFromPtr_Map_string_api_GoValue(nil)
2435
+ }
2436
+ return handleFromPtr_Map_string_api_GoValue(&cret)
2498
2437
  }
2499
2438
 
2500
- //export api_ClassDefinition_Name_Get
2501
- func api_ClassDefinition_Name_Get(handle CGoHandle) *C.char {
2502
- op := ptrFromHandle_api_ClassDefinition(handle)
2503
- return C.CString(op.Name)
2504
- }
2505
-
2506
- //export api_ClassDefinition_Name_Set
2507
- func api_ClassDefinition_Name_Set(handle CGoHandle, val *C.char) {
2508
- op := ptrFromHandle_api_ClassDefinition(handle)
2509
- op.Name = C.GoString(val)
2510
- }
2511
-
2512
- //export api_ClassDefinition_PublicVariables_Get
2513
- func api_ClassDefinition_PublicVariables_Get(handle CGoHandle) CGoHandle {
2514
- op := ptrFromHandle_api_ClassDefinition(handle)
2515
- return handleFromPtr_Map_string_Ptr_api_ClassVariable(&op.PublicVariables)
2516
- }
2517
-
2518
- //export api_ClassDefinition_PublicVariables_Set
2519
- func api_ClassDefinition_PublicVariables_Set(handle CGoHandle, val CGoHandle) {
2520
- op := ptrFromHandle_api_ClassDefinition(handle)
2521
- op.PublicVariables = deptrFromHandle_Map_string_Ptr_api_ClassVariable(val)
2522
- }
2523
-
2524
- //export api_ClassDefinition_PrivateVariables_Get
2525
- func api_ClassDefinition_PrivateVariables_Get(handle CGoHandle) CGoHandle {
2526
- op := ptrFromHandle_api_ClassDefinition(handle)
2527
- return handleFromPtr_Map_string_Ptr_api_ClassVariable(&op.PrivateVariables)
2528
- }
2529
-
2530
- //export api_ClassDefinition_PrivateVariables_Set
2531
- func api_ClassDefinition_PrivateVariables_Set(handle CGoHandle, val CGoHandle) {
2532
- op := ptrFromHandle_api_ClassDefinition(handle)
2533
- op.PrivateVariables = deptrFromHandle_Map_string_Ptr_api_ClassVariable(val)
2534
- }
2535
-
2536
- //export api_ClassDefinition_SharedVariables_Get
2537
- func api_ClassDefinition_SharedVariables_Get(handle CGoHandle) CGoHandle {
2538
- op := ptrFromHandle_api_ClassDefinition(handle)
2539
- return handleFromPtr_Map_string_Ptr_api_ClassVariable(&op.SharedVariables)
2540
- }
2541
-
2542
- //export api_ClassDefinition_SharedVariables_Set
2543
- func api_ClassDefinition_SharedVariables_Set(handle CGoHandle, val CGoHandle) {
2544
- op := ptrFromHandle_api_ClassDefinition(handle)
2545
- op.SharedVariables = deptrFromHandle_Map_string_Ptr_api_ClassVariable(val)
2546
- }
2547
-
2548
- //export api_ClassDefinition_PublicMethods_Get
2549
- func api_ClassDefinition_PublicMethods_Get(handle CGoHandle) CGoHandle {
2550
- op := ptrFromHandle_api_ClassDefinition(handle)
2551
- return handleFromPtr_Map_string_Ptr_api_ClassMethod(&op.PublicMethods)
2552
- }
2553
-
2554
- //export api_ClassDefinition_PublicMethods_Set
2555
- func api_ClassDefinition_PublicMethods_Set(handle CGoHandle, val CGoHandle) {
2556
- op := ptrFromHandle_api_ClassDefinition(handle)
2557
- op.PublicMethods = deptrFromHandle_Map_string_Ptr_api_ClassMethod(val)
2558
- }
2559
-
2560
- //export api_ClassDefinition_PrivateMethods_Get
2561
- func api_ClassDefinition_PrivateMethods_Get(handle CGoHandle) CGoHandle {
2562
- op := ptrFromHandle_api_ClassDefinition(handle)
2563
- return handleFromPtr_Map_string_Ptr_api_ClassMethod(&op.PrivateMethods)
2564
- }
2565
-
2566
- //export api_ClassDefinition_PrivateMethods_Set
2567
- func api_ClassDefinition_PrivateMethods_Set(handle CGoHandle, val CGoHandle) {
2568
- op := ptrFromHandle_api_ClassDefinition(handle)
2569
- op.PrivateMethods = deptrFromHandle_Map_string_Ptr_api_ClassMethod(val)
2570
- }
2571
-
2572
- //export api_ClassDefinition_UnknownFunctionHandler_Get
2573
- func api_ClassDefinition_UnknownFunctionHandler_Get(handle CGoHandle) CGoHandle {
2574
- op := ptrFromHandle_api_ClassDefinition(handle)
2575
- return handleFromPtr_Ptr_api_UnknownFunctionHandler(op.UnknownFunctionHandler)
2576
- }
2439
+ //export api_GoValue_Object
2440
+ func api_GoValue_Object(_handle CGoHandle) CGoHandle {
2441
+ _saved_thread := C.PyEval_SaveThread()
2442
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2443
+ if __err != nil {
2444
+ return handleFromPtr_Ptr_environment_ObjectInstance(nil)
2445
+ }
2446
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Object()
2577
2447
 
2578
- //export api_ClassDefinition_UnknownFunctionHandler_Set
2579
- func api_ClassDefinition_UnknownFunctionHandler_Set(handle CGoHandle, val CGoHandle) {
2580
- op := ptrFromHandle_api_ClassDefinition(handle)
2581
- op.UnknownFunctionHandler = ptrFromHandle_Ptr_api_UnknownFunctionHandler(val)
2448
+ C.PyEval_RestoreThread(_saved_thread)
2449
+ if __err != nil {
2450
+ estr := C.CString(__err.Error())
2451
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2452
+ C.free(unsafe.Pointer(estr))
2453
+ return handleFromPtr_Ptr_environment_ObjectInstance(nil)
2454
+ }
2455
+ return handleFromPtr_Ptr_environment_ObjectInstance(cret)
2582
2456
  }
2583
2457
 
2584
- // --- wrapping struct: api.ExecutionResult ---
2458
+ // --- wrapping struct: api.UnknownFunctionHandler ---
2585
2459
  //
2586
- //export api_ExecutionResult_CTor
2587
- func api_ExecutionResult_CTor() CGoHandle {
2588
- return CGoHandle(handleFromPtr_api_ExecutionResult(&api.ExecutionResult{}))
2589
- }
2590
-
2591
- //export api_ExecutionResult_Value_Get
2592
- func api_ExecutionResult_Value_Get(handle CGoHandle) CGoHandle {
2593
- op := ptrFromHandle_api_ExecutionResult(handle)
2594
- return handleFromPtr_api_GoValue(&op.Value)
2595
- }
2596
-
2597
- //export api_ExecutionResult_Value_Set
2598
- func api_ExecutionResult_Value_Set(handle CGoHandle, val CGoHandle) {
2599
- op := ptrFromHandle_api_ExecutionResult(handle)
2600
- op.Value = *ptrFromHandle_api_GoValue(val)
2601
- }
2602
-
2603
- //export api_ExecutionResult_RawValue_Get
2604
- func api_ExecutionResult_RawValue_Get(handle CGoHandle) CGoHandle {
2605
- op := ptrFromHandle_api_ExecutionResult(handle)
2606
- return handleFromPtr_environment_Value(op.RawValue)
2607
- }
2608
-
2609
- //export api_ExecutionResult_RawValue_Set
2610
- func api_ExecutionResult_RawValue_Set(handle CGoHandle, val CGoHandle) {
2611
- op := ptrFromHandle_api_ExecutionResult(handle)
2612
- op.RawValue = ptrFromHandle_environment_Value(val)
2613
- }
2614
-
2615
- //export api_ExecutionResult_Output_Get
2616
- func api_ExecutionResult_Output_Get(handle CGoHandle) *C.char {
2617
- op := ptrFromHandle_api_ExecutionResult(handle)
2618
- return C.CString(op.Output)
2619
- }
2620
-
2621
- //export api_ExecutionResult_Output_Set
2622
- func api_ExecutionResult_Output_Set(handle CGoHandle, val *C.char) {
2623
- op := ptrFromHandle_api_ExecutionResult(handle)
2624
- op.Output = C.GoString(val)
2460
+ //export api_UnknownFunctionHandler_CTor
2461
+ func api_UnknownFunctionHandler_CTor() CGoHandle {
2462
+ return CGoHandle(handleFromPtr_api_UnknownFunctionHandler(&api.UnknownFunctionHandler{}))
2625
2463
  }
2626
2464
 
2627
- // --- wrapping struct: api.GoValue ---
2465
+ // --- wrapping struct: api.VM ---
2628
2466
  //
2629
- //export api_GoValue_CTor
2630
- func api_GoValue_CTor() CGoHandle {
2631
- return CGoHandle(handleFromPtr_api_GoValue(&api.GoValue{}))
2467
+ //export api_VM_CTor
2468
+ func api_VM_CTor() CGoHandle {
2469
+ return CGoHandle(handleFromPtr_api_VM(&api.VM{}))
2632
2470
  }
2633
2471
 
2634
- //export api_GoValue_ID
2635
- func api_GoValue_ID(_handle CGoHandle) *C.char {
2472
+ //export api_VM_GetCompatibilityShim
2473
+ func api_VM_GetCompatibilityShim(_handle CGoHandle) CGoHandle {
2636
2474
  _saved_thread := C.PyEval_SaveThread()
2637
2475
  defer C.PyEval_RestoreThread(_saved_thread)
2638
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2476
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2639
2477
  if __err != nil {
2640
- return C.CString("")
2478
+ return handleFromPtr_Ptr_api_VMCompatibilityShim(nil)
2641
2479
  }
2642
- return C.CString(gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).ID())
2480
+ return handleFromPtr_Ptr_api_VMCompatibilityShim(gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).GetCompatibilityShim())
2643
2481
 
2644
2482
  }
2645
2483
 
2646
- //export api_GoValue_MarshalJSON
2647
- func api_GoValue_MarshalJSON(_handle CGoHandle) CGoHandle {
2484
+ //export api_VM_Execute
2485
+ func api_VM_Execute(_handle CGoHandle, code *C.char) CGoHandle {
2648
2486
  _saved_thread := C.PyEval_SaveThread()
2649
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2487
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2650
2488
  if __err != nil {
2651
- return handleFromPtr_Slice_byte(nil)
2489
+ return handleFromPtr_Ptr_api_ExecutionResult(nil)
2652
2490
  }
2653
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).MarshalJSON()
2491
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).Execute(C.GoString(code))
2654
2492
 
2655
2493
  C.PyEval_RestoreThread(_saved_thread)
2656
2494
  if __err != nil {
2657
2495
  estr := C.CString(__err.Error())
2658
2496
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2659
2497
  C.free(unsafe.Pointer(estr))
2660
- return handleFromPtr_Slice_byte(nil)
2661
- }
2662
- return handleFromPtr_Slice_byte(&cret)
2663
- }
2664
-
2665
- //export api_GoValue_Type
2666
- func api_GoValue_Type(_handle CGoHandle) *C.char {
2667
- _saved_thread := C.PyEval_SaveThread()
2668
- defer C.PyEval_RestoreThread(_saved_thread)
2669
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2670
- if __err != nil {
2671
- return C.CString("")
2498
+ return handleFromPtr_Ptr_api_ExecutionResult(nil)
2672
2499
  }
2673
- return C.CString(gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Type())
2674
-
2500
+ return handleFromPtr_Ptr_api_ExecutionResult(cret)
2675
2501
  }
2676
2502
 
2677
- //export api_GoValue_Int
2678
- func api_GoValue_Int(_handle CGoHandle) C.longlong {
2503
+ //export api_VM_ExecuteWithContext
2504
+ func api_VM_ExecuteWithContext(_handle CGoHandle, ctx CGoHandle, code *C.char) CGoHandle {
2679
2505
  _saved_thread := C.PyEval_SaveThread()
2680
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2506
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2681
2507
  if __err != nil {
2682
- return C.longlong(0)
2508
+ return handleFromPtr_Ptr_api_ExecutionResult(nil)
2683
2509
  }
2684
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Int()
2510
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).ExecuteWithContext(ptrFromHandle_context_Context(ctx), C.GoString(code))
2685
2511
 
2686
2512
  C.PyEval_RestoreThread(_saved_thread)
2687
2513
  if __err != nil {
2688
2514
  estr := C.CString(__err.Error())
2689
2515
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2690
2516
  C.free(unsafe.Pointer(estr))
2691
- return C.longlong(0)
2517
+ return handleFromPtr_Ptr_api_ExecutionResult(nil)
2692
2518
  }
2693
- return C.longlong(cret)
2519
+ return handleFromPtr_Ptr_api_ExecutionResult(cret)
2694
2520
  }
2695
2521
 
2696
- //export api_GoValue_Float
2697
- func api_GoValue_Float(_handle CGoHandle) C.double {
2522
+ //export api_VM_NewObjectInstance
2523
+ func api_VM_NewObjectInstance(_handle CGoHandle, className *C.char) CGoHandle {
2698
2524
  _saved_thread := C.PyEval_SaveThread()
2699
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2525
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2700
2526
  if __err != nil {
2701
- return C.double(0)
2527
+ return handleFromPtr_api_GoValue(nil)
2702
2528
  }
2703
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Float()
2529
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).NewObjectInstance(C.GoString(className))
2704
2530
 
2705
2531
  C.PyEval_RestoreThread(_saved_thread)
2706
2532
  if __err != nil {
2707
2533
  estr := C.CString(__err.Error())
2708
2534
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2709
2535
  C.free(unsafe.Pointer(estr))
2710
- return C.double(0)
2536
+ return handleFromPtr_api_GoValue(nil)
2711
2537
  }
2712
- return C.double(cret)
2538
+ return handleFromPtr_api_GoValue(&cret)
2713
2539
  }
2714
2540
 
2715
- //export api_GoValue_String
2716
- func api_GoValue_String(_handle CGoHandle) *C.char {
2541
+ //export api_VM_Call
2542
+ func api_VM_Call(_handle CGoHandle, functionName *C.char, args CGoHandle) CGoHandle {
2717
2543
  _saved_thread := C.PyEval_SaveThread()
2718
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2544
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2719
2545
  if __err != nil {
2720
- return C.CString("")
2546
+ return handleFromPtr_api_GoValue(nil)
2721
2547
  }
2722
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).String()
2548
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).Call(C.GoString(functionName), deptrFromHandle_Slice_api_GoValue(args))
2723
2549
 
2724
2550
  C.PyEval_RestoreThread(_saved_thread)
2725
2551
  if __err != nil {
2726
2552
  estr := C.CString(__err.Error())
2727
2553
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2728
2554
  C.free(unsafe.Pointer(estr))
2729
- return C.CString("")
2555
+ return handleFromPtr_api_GoValue(nil)
2730
2556
  }
2731
- return C.CString(cret)
2557
+ return handleFromPtr_api_GoValue(&cret)
2732
2558
  }
2733
2559
 
2734
- //export api_GoValue_Bool
2735
- func api_GoValue_Bool(_handle CGoHandle) C.char {
2560
+ //export api_VM_CallMethod
2561
+ func api_VM_CallMethod(_handle CGoHandle, object CGoHandle, methodName *C.char, args CGoHandle) CGoHandle {
2736
2562
  _saved_thread := C.PyEval_SaveThread()
2737
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2563
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2738
2564
  if __err != nil {
2739
- return boolGoToPy(false)
2565
+ return handleFromPtr_api_GoValue(nil)
2740
2566
  }
2741
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Bool()
2567
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).CallMethod(*ptrFromHandle_api_GoValue(object), C.GoString(methodName), deptrFromHandle_Slice_api_GoValue(args))
2742
2568
 
2743
2569
  C.PyEval_RestoreThread(_saved_thread)
2744
2570
  if __err != nil {
2745
2571
  estr := C.CString(__err.Error())
2746
2572
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2747
2573
  C.free(unsafe.Pointer(estr))
2748
- return boolGoToPy(false)
2574
+ return handleFromPtr_api_GoValue(nil)
2749
2575
  }
2750
- return boolGoToPy(cret)
2576
+ return handleFromPtr_api_GoValue(&cret)
2751
2577
  }
2752
2578
 
2753
- //export api_GoValue_Slice
2754
- func api_GoValue_Slice(_handle CGoHandle) CGoHandle {
2579
+ //export api_VM_DefineVariable
2580
+ func api_VM_DefineVariable(_handle CGoHandle, name *C.char, value CGoHandle, constant C.char) *C.char {
2755
2581
  _saved_thread := C.PyEval_SaveThread()
2756
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2582
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2757
2583
  if __err != nil {
2758
- return handleFromPtr_Slice_api_GoValue(nil)
2584
+ return errorGoToPy(nil)
2759
2585
  }
2760
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Slice()
2586
+ __err = gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).DefineVariable(C.GoString(name), *ptrFromHandle_api_GoValue(value), boolPyToGo(constant))
2761
2587
 
2762
2588
  C.PyEval_RestoreThread(_saved_thread)
2763
2589
  if __err != nil {
2764
2590
  estr := C.CString(__err.Error())
2765
2591
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2766
- C.free(unsafe.Pointer(estr))
2767
- return handleFromPtr_Slice_api_GoValue(nil)
2592
+ return estr
2768
2593
  }
2769
- return handleFromPtr_Slice_api_GoValue(&cret)
2594
+ return C.CString("")
2770
2595
  }
2771
2596
 
2772
- //export api_GoValue_Map
2773
- func api_GoValue_Map(_handle CGoHandle) CGoHandle {
2597
+ //export api_VM_SetVariable
2598
+ func api_VM_SetVariable(_handle CGoHandle, variableName *C.char, value CGoHandle) *C.char {
2774
2599
  _saved_thread := C.PyEval_SaveThread()
2775
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2600
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2776
2601
  if __err != nil {
2777
- return handleFromPtr_Map_string_api_GoValue(nil)
2602
+ return errorGoToPy(nil)
2778
2603
  }
2779
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Map()
2604
+ __err = gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).SetVariable(C.GoString(variableName), *ptrFromHandle_api_GoValue(value))
2780
2605
 
2781
2606
  C.PyEval_RestoreThread(_saved_thread)
2782
2607
  if __err != nil {
2783
2608
  estr := C.CString(__err.Error())
2784
2609
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2785
- C.free(unsafe.Pointer(estr))
2786
- return handleFromPtr_Map_string_api_GoValue(nil)
2610
+ return estr
2787
2611
  }
2788
- return handleFromPtr_Map_string_api_GoValue(&cret)
2612
+ return C.CString("")
2789
2613
  }
2790
2614
 
2791
- //export api_GoValue_Object
2792
- func api_GoValue_Object(_handle CGoHandle) CGoHandle {
2615
+ //export api_VM_GetVariable
2616
+ func api_VM_GetVariable(_handle CGoHandle, variableName *C.char) CGoHandle {
2793
2617
  _saved_thread := C.PyEval_SaveThread()
2794
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2618
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2795
2619
  if __err != nil {
2796
- return handleFromPtr_Ptr_environment_ObjectInstance(nil)
2620
+ return handleFromPtr_api_GoValue(nil)
2797
2621
  }
2798
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Object()
2622
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).GetVariable(C.GoString(variableName))
2799
2623
 
2800
2624
  C.PyEval_RestoreThread(_saved_thread)
2801
2625
  if __err != nil {
2802
2626
  estr := C.CString(__err.Error())
2803
2627
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2804
2628
  C.free(unsafe.Pointer(estr))
2805
- return handleFromPtr_Ptr_environment_ObjectInstance(nil)
2629
+ return handleFromPtr_api_GoValue(nil)
2806
2630
  }
2807
- return handleFromPtr_Ptr_environment_ObjectInstance(cret)
2631
+ return handleFromPtr_api_GoValue(&cret)
2808
2632
  }
2809
2633
 
2810
- // --- wrapping struct: api.UnknownFunctionHandler ---
2811
- //
2812
- //export api_UnknownFunctionHandler_CTor
2813
- func api_UnknownFunctionHandler_CTor() CGoHandle {
2814
- return CGoHandle(handleFromPtr_api_UnknownFunctionHandler(&api.UnknownFunctionHandler{}))
2634
+ //export api_VM_DefineClass
2635
+ func api_VM_DefineClass(_handle CGoHandle, classDef CGoHandle) *C.char {
2636
+ _saved_thread := C.PyEval_SaveThread()
2637
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2638
+ if __err != nil {
2639
+ return errorGoToPy(nil)
2640
+ }
2641
+ __err = gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).DefineClass(ptrFromHandle_Ptr_api_ClassDefinition(classDef))
2642
+
2643
+ C.PyEval_RestoreThread(_saved_thread)
2644
+ if __err != nil {
2645
+ estr := C.CString(__err.Error())
2646
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2647
+ return estr
2648
+ }
2649
+ return C.CString("")
2815
2650
  }
2816
2651
 
2817
- // --- wrapping struct: api.VM ---
2652
+ // --- wrapping struct: api.VMConfig ---
2818
2653
  //
2819
- //export api_VM_CTor
2820
- func api_VM_CTor() CGoHandle {
2821
- return CGoHandle(handleFromPtr_api_VM(&api.VM{}))
2654
+ //export api_VMConfig_CTor
2655
+ func api_VMConfig_CTor() CGoHandle {
2656
+ return CGoHandle(handleFromPtr_api_VMConfig(&api.VMConfig{}))
2822
2657
  }
2823
2658
 
2824
- //export api_VM_GetCompatibilityShim
2825
- func api_VM_GetCompatibilityShim(_handle CGoHandle) CGoHandle {
2826
- _saved_thread := C.PyEval_SaveThread()
2827
- defer C.PyEval_RestoreThread(_saved_thread)
2828
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2829
- if __err != nil {
2830
- return handleFromPtr_Ptr_api_VMCompatibilityShim(nil)
2831
- }
2832
- return handleFromPtr_Ptr_api_VMCompatibilityShim(gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).GetCompatibilityShim())
2659
+ //export api_VMConfig_Stdout_Get
2660
+ func api_VMConfig_Stdout_Get(handle CGoHandle) CGoHandle {
2661
+ op := ptrFromHandle_api_VMConfig(handle)
2662
+ return handleFromPtr_io_Writer(op.Stdout)
2663
+ }
2664
+
2665
+ //export api_VMConfig_Stdout_Set
2666
+ func api_VMConfig_Stdout_Set(handle CGoHandle, val CGoHandle) {
2667
+ op := ptrFromHandle_api_VMConfig(handle)
2668
+ op.Stdout = ptrFromHandle_io_Writer(val)
2669
+ }
2833
2670
 
2671
+ //export api_VMConfig_Stdin_Get
2672
+ func api_VMConfig_Stdin_Get(handle CGoHandle) CGoHandle {
2673
+ op := ptrFromHandle_api_VMConfig(handle)
2674
+ return handleFromPtr_io_Reader(op.Stdin)
2834
2675
  }
2835
2676
 
2836
- //export api_VM_Execute
2837
- func api_VM_Execute(_handle CGoHandle, code *C.char) CGoHandle {
2677
+ //export api_VMConfig_Stdin_Set
2678
+ func api_VMConfig_Stdin_Set(handle CGoHandle, val CGoHandle) {
2679
+ op := ptrFromHandle_api_VMConfig(handle)
2680
+ op.Stdin = ptrFromHandle_io_Reader(val)
2681
+ }
2682
+
2683
+ //export api_VMConfig_Timeout_Get
2684
+ func api_VMConfig_Timeout_Get(handle CGoHandle) C.longlong {
2685
+ op := ptrFromHandle_api_VMConfig(handle)
2686
+ return C.longlong(int64(op.Timeout))
2687
+ }
2688
+
2689
+ //export api_VMConfig_Timeout_Set
2690
+ func api_VMConfig_Timeout_Set(handle CGoHandle, val C.longlong) {
2691
+ op := ptrFromHandle_api_VMConfig(handle)
2692
+ op.Timeout = time.Duration(int64(val))
2693
+ }
2694
+
2695
+ //export api_VMConfig_WorkingDirectory_Get
2696
+ func api_VMConfig_WorkingDirectory_Get(handle CGoHandle) *C.char {
2697
+ op := ptrFromHandle_api_VMConfig(handle)
2698
+ return C.CString(op.WorkingDirectory)
2699
+ }
2700
+
2701
+ //export api_VMConfig_WorkingDirectory_Set
2702
+ func api_VMConfig_WorkingDirectory_Set(handle CGoHandle, val *C.char) {
2703
+ op := ptrFromHandle_api_VMConfig(handle)
2704
+ op.WorkingDirectory = C.GoString(val)
2705
+ }
2706
+
2707
+ //export api_VMConfig_Validate
2708
+ func api_VMConfig_Validate(_handle CGoHandle) *C.char {
2838
2709
  _saved_thread := C.PyEval_SaveThread()
2839
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2710
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMConfig")
2840
2711
  if __err != nil {
2841
- return handleFromPtr_Ptr_api_ExecutionResult(nil)
2712
+ return errorGoToPy(nil)
2842
2713
  }
2843
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).Execute(C.GoString(code))
2714
+ __err = gopyh.Embed(vifc, reflect.TypeOf(api.VMConfig{})).(*api.VMConfig).Validate()
2844
2715
 
2845
2716
  C.PyEval_RestoreThread(_saved_thread)
2846
2717
  if __err != nil {
2847
2718
  estr := C.CString(__err.Error())
2848
2719
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2849
- C.free(unsafe.Pointer(estr))
2850
- return handleFromPtr_Ptr_api_ExecutionResult(nil)
2720
+ return estr
2851
2721
  }
2852
- return handleFromPtr_Ptr_api_ExecutionResult(cret)
2722
+ return C.CString("")
2853
2723
  }
2854
2724
 
2855
- //export api_VM_ExecuteWithContext
2856
- func api_VM_ExecuteWithContext(_handle CGoHandle, ctx CGoHandle, code *C.char) CGoHandle {
2725
+ // --- wrapping struct: api.ClassDefinition ---
2726
+ //
2727
+ //export api_ClassDefinition_CTor
2728
+ func api_ClassDefinition_CTor() CGoHandle {
2729
+ return CGoHandle(handleFromPtr_api_ClassDefinition(&api.ClassDefinition{}))
2730
+ }
2731
+
2732
+ //export api_ClassDefinition_Name_Get
2733
+ func api_ClassDefinition_Name_Get(handle CGoHandle) *C.char {
2734
+ op := ptrFromHandle_api_ClassDefinition(handle)
2735
+ return C.CString(op.Name)
2736
+ }
2737
+
2738
+ //export api_ClassDefinition_Name_Set
2739
+ func api_ClassDefinition_Name_Set(handle CGoHandle, val *C.char) {
2740
+ op := ptrFromHandle_api_ClassDefinition(handle)
2741
+ op.Name = C.GoString(val)
2742
+ }
2743
+
2744
+ //export api_ClassDefinition_PublicVariables_Get
2745
+ func api_ClassDefinition_PublicVariables_Get(handle CGoHandle) CGoHandle {
2746
+ op := ptrFromHandle_api_ClassDefinition(handle)
2747
+ return handleFromPtr_Map_string_Ptr_api_ClassVariable(&op.PublicVariables)
2748
+ }
2749
+
2750
+ //export api_ClassDefinition_PublicVariables_Set
2751
+ func api_ClassDefinition_PublicVariables_Set(handle CGoHandle, val CGoHandle) {
2752
+ op := ptrFromHandle_api_ClassDefinition(handle)
2753
+ op.PublicVariables = deptrFromHandle_Map_string_Ptr_api_ClassVariable(val)
2754
+ }
2755
+
2756
+ //export api_ClassDefinition_PrivateVariables_Get
2757
+ func api_ClassDefinition_PrivateVariables_Get(handle CGoHandle) CGoHandle {
2758
+ op := ptrFromHandle_api_ClassDefinition(handle)
2759
+ return handleFromPtr_Map_string_Ptr_api_ClassVariable(&op.PrivateVariables)
2760
+ }
2761
+
2762
+ //export api_ClassDefinition_PrivateVariables_Set
2763
+ func api_ClassDefinition_PrivateVariables_Set(handle CGoHandle, val CGoHandle) {
2764
+ op := ptrFromHandle_api_ClassDefinition(handle)
2765
+ op.PrivateVariables = deptrFromHandle_Map_string_Ptr_api_ClassVariable(val)
2766
+ }
2767
+
2768
+ //export api_ClassDefinition_SharedVariables_Get
2769
+ func api_ClassDefinition_SharedVariables_Get(handle CGoHandle) CGoHandle {
2770
+ op := ptrFromHandle_api_ClassDefinition(handle)
2771
+ return handleFromPtr_Map_string_Ptr_api_ClassVariable(&op.SharedVariables)
2772
+ }
2773
+
2774
+ //export api_ClassDefinition_SharedVariables_Set
2775
+ func api_ClassDefinition_SharedVariables_Set(handle CGoHandle, val CGoHandle) {
2776
+ op := ptrFromHandle_api_ClassDefinition(handle)
2777
+ op.SharedVariables = deptrFromHandle_Map_string_Ptr_api_ClassVariable(val)
2778
+ }
2779
+
2780
+ //export api_ClassDefinition_PublicMethods_Get
2781
+ func api_ClassDefinition_PublicMethods_Get(handle CGoHandle) CGoHandle {
2782
+ op := ptrFromHandle_api_ClassDefinition(handle)
2783
+ return handleFromPtr_Map_string_Ptr_api_ClassMethod(&op.PublicMethods)
2784
+ }
2785
+
2786
+ //export api_ClassDefinition_PublicMethods_Set
2787
+ func api_ClassDefinition_PublicMethods_Set(handle CGoHandle, val CGoHandle) {
2788
+ op := ptrFromHandle_api_ClassDefinition(handle)
2789
+ op.PublicMethods = deptrFromHandle_Map_string_Ptr_api_ClassMethod(val)
2790
+ }
2791
+
2792
+ //export api_ClassDefinition_PrivateMethods_Get
2793
+ func api_ClassDefinition_PrivateMethods_Get(handle CGoHandle) CGoHandle {
2794
+ op := ptrFromHandle_api_ClassDefinition(handle)
2795
+ return handleFromPtr_Map_string_Ptr_api_ClassMethod(&op.PrivateMethods)
2796
+ }
2797
+
2798
+ //export api_ClassDefinition_PrivateMethods_Set
2799
+ func api_ClassDefinition_PrivateMethods_Set(handle CGoHandle, val CGoHandle) {
2800
+ op := ptrFromHandle_api_ClassDefinition(handle)
2801
+ op.PrivateMethods = deptrFromHandle_Map_string_Ptr_api_ClassMethod(val)
2802
+ }
2803
+
2804
+ //export api_ClassDefinition_UnknownFunctionHandler_Get
2805
+ func api_ClassDefinition_UnknownFunctionHandler_Get(handle CGoHandle) CGoHandle {
2806
+ op := ptrFromHandle_api_ClassDefinition(handle)
2807
+ return handleFromPtr_Ptr_api_UnknownFunctionHandler(op.UnknownFunctionHandler)
2808
+ }
2809
+
2810
+ //export api_ClassDefinition_UnknownFunctionHandler_Set
2811
+ func api_ClassDefinition_UnknownFunctionHandler_Set(handle CGoHandle, val CGoHandle) {
2812
+ op := ptrFromHandle_api_ClassDefinition(handle)
2813
+ op.UnknownFunctionHandler = ptrFromHandle_Ptr_api_UnknownFunctionHandler(val)
2814
+ }
2815
+
2816
+ // --- wrapping struct: api.ClassMethod ---
2817
+ //
2818
+ //export api_ClassMethod_CTor
2819
+ func api_ClassMethod_CTor() CGoHandle {
2820
+ return CGoHandle(handleFromPtr_api_ClassMethod(&api.ClassMethod{}))
2821
+ }
2822
+
2823
+ //export api_ClassMethod_Name_Get
2824
+ func api_ClassMethod_Name_Get(handle CGoHandle) *C.char {
2825
+ op := ptrFromHandle_api_ClassMethod(handle)
2826
+ return C.CString(op.Name)
2827
+ }
2828
+
2829
+ //export api_ClassMethod_Name_Set
2830
+ func api_ClassMethod_Name_Set(handle CGoHandle, val *C.char) {
2831
+ op := ptrFromHandle_api_ClassMethod(handle)
2832
+ op.Name = C.GoString(val)
2833
+ }
2834
+
2835
+ //export api_ClassMethod_Argc_Get
2836
+ func api_ClassMethod_Argc_Get(handle CGoHandle) C.longlong {
2837
+ op := ptrFromHandle_api_ClassMethod(handle)
2838
+ return C.longlong(op.Argc)
2839
+ }
2840
+
2841
+ //export api_ClassMethod_Argc_Set
2842
+ func api_ClassMethod_Argc_Set(handle CGoHandle, val C.longlong) {
2843
+ op := ptrFromHandle_api_ClassMethod(handle)
2844
+ op.Argc = int(val)
2845
+ }
2846
+
2847
+ // --- wrapping struct: api.ClassVariable ---
2848
+ //
2849
+ //export api_ClassVariable_CTor
2850
+ func api_ClassVariable_CTor() CGoHandle {
2851
+ return CGoHandle(handleFromPtr_api_ClassVariable(&api.ClassVariable{}))
2852
+ }
2853
+
2854
+ //export api_ClassVariable_Name_Get
2855
+ func api_ClassVariable_Name_Get(handle CGoHandle) *C.char {
2856
+ op := ptrFromHandle_api_ClassVariable(handle)
2857
+ return C.CString(op.Name)
2858
+ }
2859
+
2860
+ //export api_ClassVariable_Name_Set
2861
+ func api_ClassVariable_Name_Set(handle CGoHandle, val *C.char) {
2862
+ op := ptrFromHandle_api_ClassVariable(handle)
2863
+ op.Name = C.GoString(val)
2864
+ }
2865
+
2866
+ //export api_ClassVariable_Value_Get
2867
+ func api_ClassVariable_Value_Get(handle CGoHandle) CGoHandle {
2868
+ op := ptrFromHandle_api_ClassVariable(handle)
2869
+ return handleFromPtr_api_GoValue(&op.Value)
2870
+ }
2871
+
2872
+ //export api_ClassVariable_Value_Set
2873
+ func api_ClassVariable_Value_Set(handle CGoHandle, val CGoHandle) {
2874
+ op := ptrFromHandle_api_ClassVariable(handle)
2875
+ op.Value = *ptrFromHandle_api_GoValue(val)
2876
+ }
2877
+
2878
+ //export api_ClassVariable_Locked_Get
2879
+ func api_ClassVariable_Locked_Get(handle CGoHandle) C.char {
2880
+ op := ptrFromHandle_api_ClassVariable(handle)
2881
+ return boolGoToPy(op.Locked)
2882
+ }
2883
+
2884
+ //export api_ClassVariable_Locked_Set
2885
+ func api_ClassVariable_Locked_Set(handle CGoHandle, val C.char) {
2886
+ op := ptrFromHandle_api_ClassVariable(handle)
2887
+ op.Locked = boolPyToGo(val)
2888
+ }
2889
+
2890
+ // --- wrapping struct: api.VMError ---
2891
+ //
2892
+ //export api_VMError_CTor
2893
+ func api_VMError_CTor() CGoHandle {
2894
+ return CGoHandle(handleFromPtr_api_VMError(&api.VMError{}))
2895
+ }
2896
+
2897
+ //export api_VMError_Type_Get
2898
+ func api_VMError_Type_Get(handle CGoHandle) *C.char {
2899
+ op := ptrFromHandle_api_VMError(handle)
2900
+ return C.CString(string(op.Type))
2901
+ }
2902
+
2903
+ //export api_VMError_Type_Set
2904
+ func api_VMError_Type_Set(handle CGoHandle, val *C.char) {
2905
+ op := ptrFromHandle_api_VMError(handle)
2906
+ op.Type = api.ErrorType(C.GoString(val))
2907
+ }
2908
+
2909
+ //export api_VMError_Message_Get
2910
+ func api_VMError_Message_Get(handle CGoHandle) *C.char {
2911
+ op := ptrFromHandle_api_VMError(handle)
2912
+ return C.CString(op.Message)
2913
+ }
2914
+
2915
+ //export api_VMError_Message_Set
2916
+ func api_VMError_Message_Set(handle CGoHandle, val *C.char) {
2917
+ op := ptrFromHandle_api_VMError(handle)
2918
+ op.Message = C.GoString(val)
2919
+ }
2920
+
2921
+ //export api_VMError_Source_Get
2922
+ func api_VMError_Source_Get(handle CGoHandle) CGoHandle {
2923
+ op := ptrFromHandle_api_VMError(handle)
2924
+ return handleFromPtr_Ptr_api_SourceLocation(op.Source)
2925
+ }
2926
+
2927
+ //export api_VMError_Source_Set
2928
+ func api_VMError_Source_Set(handle CGoHandle, val CGoHandle) {
2929
+ op := ptrFromHandle_api_VMError(handle)
2930
+ op.Source = ptrFromHandle_Ptr_api_SourceLocation(val)
2931
+ }
2932
+
2933
+ //export api_VMError_Duration_Get
2934
+ func api_VMError_Duration_Get(handle CGoHandle) C.longlong {
2935
+ op := ptrFromHandle_api_VMError(handle)
2936
+ return C.longlong(int64(op.Duration))
2937
+ }
2938
+
2939
+ //export api_VMError_Duration_Set
2940
+ func api_VMError_Duration_Set(handle CGoHandle, val C.longlong) {
2941
+ op := ptrFromHandle_api_VMError(handle)
2942
+ op.Duration = time.Duration(int64(val))
2943
+ }
2944
+
2945
+ //export api_VMError_Error
2946
+ func api_VMError_Error(_handle CGoHandle) *C.char {
2857
2947
  _saved_thread := C.PyEval_SaveThread()
2858
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2948
+ defer C.PyEval_RestoreThread(_saved_thread)
2949
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2859
2950
  if __err != nil {
2860
- return handleFromPtr_Ptr_api_ExecutionResult(nil)
2951
+ return C.CString("")
2861
2952
  }
2862
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).ExecuteWithContext(ptrFromHandle_context_Context(ctx), C.GoString(code))
2953
+ return C.CString(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).Error())
2863
2954
 
2864
- C.PyEval_RestoreThread(_saved_thread)
2865
- if __err != nil {
2866
- estr := C.CString(__err.Error())
2867
- C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2868
- C.free(unsafe.Pointer(estr))
2869
- return handleFromPtr_Ptr_api_ExecutionResult(nil)
2870
- }
2871
- return handleFromPtr_Ptr_api_ExecutionResult(cret)
2872
2955
  }
2873
2956
 
2874
- //export api_VM_NewObjectInstance
2875
- func api_VM_NewObjectInstance(_handle CGoHandle, className *C.char) CGoHandle {
2957
+ //export api_VMError_Unwrap
2958
+ func api_VMError_Unwrap(_handle CGoHandle) *C.char {
2876
2959
  _saved_thread := C.PyEval_SaveThread()
2877
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2960
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2878
2961
  if __err != nil {
2879
- return handleFromPtr_api_GoValue(nil)
2962
+ return errorGoToPy(nil)
2880
2963
  }
2881
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).NewObjectInstance(C.GoString(className))
2964
+ __err = gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).Unwrap()
2882
2965
 
2883
2966
  C.PyEval_RestoreThread(_saved_thread)
2884
2967
  if __err != nil {
2885
2968
  estr := C.CString(__err.Error())
2886
2969
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2887
- C.free(unsafe.Pointer(estr))
2888
- return handleFromPtr_api_GoValue(nil)
2970
+ return estr
2889
2971
  }
2890
- return handleFromPtr_api_GoValue(&cret)
2972
+ return C.CString("")
2891
2973
  }
2892
2974
 
2893
- //export api_VM_Call
2894
- func api_VM_Call(_handle CGoHandle, functionName *C.char, args CGoHandle) CGoHandle {
2975
+ //export api_VMError_IsCompileError
2976
+ func api_VMError_IsCompileError(_handle CGoHandle) C.char {
2895
2977
  _saved_thread := C.PyEval_SaveThread()
2896
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2978
+ defer C.PyEval_RestoreThread(_saved_thread)
2979
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2897
2980
  if __err != nil {
2898
- return handleFromPtr_api_GoValue(nil)
2981
+ return boolGoToPy(false)
2899
2982
  }
2900
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).Call(C.GoString(functionName), deptrFromHandle_Slice_api_GoValue(args))
2983
+ return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsCompileError())
2901
2984
 
2902
- C.PyEval_RestoreThread(_saved_thread)
2985
+ }
2986
+
2987
+ //export api_VMError_IsRuntimeError
2988
+ func api_VMError_IsRuntimeError(_handle CGoHandle) C.char {
2989
+ _saved_thread := C.PyEval_SaveThread()
2990
+ defer C.PyEval_RestoreThread(_saved_thread)
2991
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2903
2992
  if __err != nil {
2904
- estr := C.CString(__err.Error())
2905
- C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2906
- C.free(unsafe.Pointer(estr))
2907
- return handleFromPtr_api_GoValue(nil)
2993
+ return boolGoToPy(false)
2908
2994
  }
2909
- return handleFromPtr_api_GoValue(&cret)
2995
+ return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsRuntimeError())
2996
+
2910
2997
  }
2911
2998
 
2912
- //export api_VM_CallMethod
2913
- func api_VM_CallMethod(_handle CGoHandle, object CGoHandle, methodName *C.char, args CGoHandle) CGoHandle {
2999
+ //export api_VMError_IsTimeoutError
3000
+ func api_VMError_IsTimeoutError(_handle CGoHandle) C.char {
2914
3001
  _saved_thread := C.PyEval_SaveThread()
2915
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
3002
+ defer C.PyEval_RestoreThread(_saved_thread)
3003
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2916
3004
  if __err != nil {
2917
- return handleFromPtr_api_GoValue(nil)
3005
+ return boolGoToPy(false)
2918
3006
  }
2919
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).CallMethod(*ptrFromHandle_api_GoValue(object), C.GoString(methodName), deptrFromHandle_Slice_api_GoValue(args))
3007
+ return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsTimeoutError())
2920
3008
 
2921
- C.PyEval_RestoreThread(_saved_thread)
3009
+ }
3010
+
3011
+ //export api_VMError_IsConversionError
3012
+ func api_VMError_IsConversionError(_handle CGoHandle) C.char {
3013
+ _saved_thread := C.PyEval_SaveThread()
3014
+ defer C.PyEval_RestoreThread(_saved_thread)
3015
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2922
3016
  if __err != nil {
2923
- estr := C.CString(__err.Error())
2924
- C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2925
- C.free(unsafe.Pointer(estr))
2926
- return handleFromPtr_api_GoValue(nil)
3017
+ return boolGoToPy(false)
2927
3018
  }
2928
- return handleFromPtr_api_GoValue(&cret)
3019
+ return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsConversionError())
3020
+
3021
+ }
3022
+
3023
+ //export api_VMError_IsConfigError
3024
+ func api_VMError_IsConfigError(_handle CGoHandle) C.char {
3025
+ _saved_thread := C.PyEval_SaveThread()
3026
+ defer C.PyEval_RestoreThread(_saved_thread)
3027
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
3028
+ if __err != nil {
3029
+ return boolGoToPy(false)
3030
+ }
3031
+ return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsConfigError())
3032
+
3033
+ }
3034
+
3035
+ // --- wrapping struct: api.ExecutionResult ---
3036
+ //
3037
+ //export api_ExecutionResult_CTor
3038
+ func api_ExecutionResult_CTor() CGoHandle {
3039
+ return CGoHandle(handleFromPtr_api_ExecutionResult(&api.ExecutionResult{}))
3040
+ }
3041
+
3042
+ //export api_ExecutionResult_Value_Get
3043
+ func api_ExecutionResult_Value_Get(handle CGoHandle) CGoHandle {
3044
+ op := ptrFromHandle_api_ExecutionResult(handle)
3045
+ return handleFromPtr_api_GoValue(&op.Value)
3046
+ }
3047
+
3048
+ //export api_ExecutionResult_Value_Set
3049
+ func api_ExecutionResult_Value_Set(handle CGoHandle, val CGoHandle) {
3050
+ op := ptrFromHandle_api_ExecutionResult(handle)
3051
+ op.Value = *ptrFromHandle_api_GoValue(val)
3052
+ }
3053
+
3054
+ //export api_ExecutionResult_RawValue_Get
3055
+ func api_ExecutionResult_RawValue_Get(handle CGoHandle) CGoHandle {
3056
+ op := ptrFromHandle_api_ExecutionResult(handle)
3057
+ return handleFromPtr_environment_Value(op.RawValue)
3058
+ }
3059
+
3060
+ //export api_ExecutionResult_RawValue_Set
3061
+ func api_ExecutionResult_RawValue_Set(handle CGoHandle, val CGoHandle) {
3062
+ op := ptrFromHandle_api_ExecutionResult(handle)
3063
+ op.RawValue = ptrFromHandle_environment_Value(val)
2929
3064
  }
2930
3065
 
2931
- //export api_VM_DefineVariable
2932
- func api_VM_DefineVariable(_handle CGoHandle, name *C.char, value CGoHandle, constant C.char) *C.char {
2933
- _saved_thread := C.PyEval_SaveThread()
2934
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2935
- if __err != nil {
2936
- return errorGoToPy(nil)
2937
- }
2938
- __err = gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).DefineVariable(C.GoString(name), *ptrFromHandle_api_GoValue(value), boolPyToGo(constant))
3066
+ //export api_ExecutionResult_Output_Get
3067
+ func api_ExecutionResult_Output_Get(handle CGoHandle) *C.char {
3068
+ op := ptrFromHandle_api_ExecutionResult(handle)
3069
+ return C.CString(op.Output)
3070
+ }
2939
3071
 
2940
- C.PyEval_RestoreThread(_saved_thread)
2941
- if __err != nil {
2942
- estr := C.CString(__err.Error())
2943
- C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2944
- return estr
2945
- }
2946
- return C.CString("")
3072
+ //export api_ExecutionResult_Output_Set
3073
+ func api_ExecutionResult_Output_Set(handle CGoHandle, val *C.char) {
3074
+ op := ptrFromHandle_api_ExecutionResult(handle)
3075
+ op.Output = C.GoString(val)
2947
3076
  }
2948
3077
 
2949
- //export api_VM_SetVariable
2950
- func api_VM_SetVariable(_handle CGoHandle, variableName *C.char, value CGoHandle) *C.char {
2951
- _saved_thread := C.PyEval_SaveThread()
2952
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2953
- if __err != nil {
2954
- return errorGoToPy(nil)
2955
- }
2956
- __err = gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).SetVariable(C.GoString(variableName), *ptrFromHandle_api_GoValue(value))
3078
+ // --- wrapping struct: api.SourceLocation ---
3079
+ //
3080
+ //export api_SourceLocation_CTor
3081
+ func api_SourceLocation_CTor() CGoHandle {
3082
+ return CGoHandle(handleFromPtr_api_SourceLocation(&api.SourceLocation{}))
3083
+ }
2957
3084
 
2958
- C.PyEval_RestoreThread(_saved_thread)
2959
- if __err != nil {
2960
- estr := C.CString(__err.Error())
2961
- C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2962
- return estr
2963
- }
2964
- return C.CString("")
3085
+ //export api_SourceLocation_Filename_Get
3086
+ func api_SourceLocation_Filename_Get(handle CGoHandle) *C.char {
3087
+ op := ptrFromHandle_api_SourceLocation(handle)
3088
+ return C.CString(op.Filename)
2965
3089
  }
2966
3090
 
2967
- //export api_VM_GetVariable
2968
- func api_VM_GetVariable(_handle CGoHandle, variableName *C.char) CGoHandle {
2969
- _saved_thread := C.PyEval_SaveThread()
2970
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2971
- if __err != nil {
2972
- return handleFromPtr_api_GoValue(nil)
2973
- }
2974
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).GetVariable(C.GoString(variableName))
3091
+ //export api_SourceLocation_Filename_Set
3092
+ func api_SourceLocation_Filename_Set(handle CGoHandle, val *C.char) {
3093
+ op := ptrFromHandle_api_SourceLocation(handle)
3094
+ op.Filename = C.GoString(val)
3095
+ }
2975
3096
 
2976
- C.PyEval_RestoreThread(_saved_thread)
2977
- if __err != nil {
2978
- estr := C.CString(__err.Error())
2979
- C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2980
- C.free(unsafe.Pointer(estr))
2981
- return handleFromPtr_api_GoValue(nil)
2982
- }
2983
- return handleFromPtr_api_GoValue(&cret)
3097
+ //export api_SourceLocation_Line_Get
3098
+ func api_SourceLocation_Line_Get(handle CGoHandle) C.longlong {
3099
+ op := ptrFromHandle_api_SourceLocation(handle)
3100
+ return C.longlong(op.Line)
2984
3101
  }
2985
3102
 
2986
- //export api_VM_DefineClass
2987
- func api_VM_DefineClass(_handle CGoHandle, classDef CGoHandle) *C.char {
2988
- _saved_thread := C.PyEval_SaveThread()
2989
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2990
- if __err != nil {
2991
- return errorGoToPy(nil)
2992
- }
2993
- __err = gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).DefineClass(ptrFromHandle_Ptr_api_ClassDefinition(classDef))
3103
+ //export api_SourceLocation_Line_Set
3104
+ func api_SourceLocation_Line_Set(handle CGoHandle, val C.longlong) {
3105
+ op := ptrFromHandle_api_SourceLocation(handle)
3106
+ op.Line = int(val)
3107
+ }
2994
3108
 
2995
- C.PyEval_RestoreThread(_saved_thread)
2996
- if __err != nil {
2997
- estr := C.CString(__err.Error())
2998
- C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2999
- return estr
3000
- }
3001
- return C.CString("")
3109
+ //export api_SourceLocation_Column_Get
3110
+ func api_SourceLocation_Column_Get(handle CGoHandle) C.longlong {
3111
+ op := ptrFromHandle_api_SourceLocation(handle)
3112
+ return C.longlong(op.Column)
3113
+ }
3114
+
3115
+ //export api_SourceLocation_Column_Set
3116
+ func api_SourceLocation_Column_Set(handle CGoHandle, val C.longlong) {
3117
+ op := ptrFromHandle_api_SourceLocation(handle)
3118
+ op.Column = int(val)
3002
3119
  }
3003
3120
 
3004
3121
  // --- wrapping struct: api.VMCompatibilityShim ---
@@ -3170,202 +3287,85 @@ func api_VMCompatibilityShim_LookupObject(_handle CGoHandle, id *C.char) CGoHand
3170
3287
  if __err != nil {
3171
3288
  estr := C.CString(__err.Error())
3172
3289
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3173
- C.free(unsafe.Pointer(estr))
3174
- return handleFromPtr_api_GoValue(nil)
3175
- }
3176
- return handleFromPtr_api_GoValue(&cret)
3177
- }
3178
-
3179
- //export api_VMCompatibilityShim_GetObjectMRO
3180
- func api_VMCompatibilityShim_GetObjectMRO(_handle CGoHandle, id *C.char) CGoHandle {
3181
- _saved_thread := C.PyEval_SaveThread()
3182
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMCompatibilityShim")
3183
- if __err != nil {
3184
- return handleFromPtr_Slice_string(nil)
3185
- }
3186
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VMCompatibilityShim{})).(*api.VMCompatibilityShim).GetObjectMRO(C.GoString(id))
3187
-
3188
- C.PyEval_RestoreThread(_saved_thread)
3189
- if __err != nil {
3190
- estr := C.CString(__err.Error())
3191
- C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3192
- C.free(unsafe.Pointer(estr))
3193
- return handleFromPtr_Slice_string(nil)
3194
- }
3195
- return handleFromPtr_Slice_string(&cret)
3196
- }
3197
-
3198
- //export api_VMCompatibilityShim_GetObjectImmediateFunctions
3199
- func api_VMCompatibilityShim_GetObjectImmediateFunctions(_handle CGoHandle, id *C.char) CGoHandle {
3200
- _saved_thread := C.PyEval_SaveThread()
3201
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMCompatibilityShim")
3202
- if __err != nil {
3203
- return handleFromPtr_Slice_string(nil)
3204
- }
3205
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VMCompatibilityShim{})).(*api.VMCompatibilityShim).GetObjectImmediateFunctions(C.GoString(id))
3206
-
3207
- C.PyEval_RestoreThread(_saved_thread)
3208
- if __err != nil {
3209
- estr := C.CString(__err.Error())
3210
- C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3211
- C.free(unsafe.Pointer(estr))
3212
- return handleFromPtr_Slice_string(nil)
3213
- }
3214
- return handleFromPtr_Slice_string(&cret)
3215
- }
3216
-
3217
- //export api_VMCompatibilityShim_GetObjectImmediateVariables
3218
- func api_VMCompatibilityShim_GetObjectImmediateVariables(_handle CGoHandle, id *C.char) CGoHandle {
3219
- _saved_thread := C.PyEval_SaveThread()
3220
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMCompatibilityShim")
3221
- if __err != nil {
3222
- return handleFromPtr_Slice_string(nil)
3223
- }
3224
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VMCompatibilityShim{})).(*api.VMCompatibilityShim).GetObjectImmediateVariables(C.GoString(id))
3225
-
3226
- C.PyEval_RestoreThread(_saved_thread)
3227
- if __err != nil {
3228
- estr := C.CString(__err.Error())
3229
- C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3230
- C.free(unsafe.Pointer(estr))
3231
- return handleFromPtr_Slice_string(nil)
3232
- }
3233
- return handleFromPtr_Slice_string(&cret)
3234
- }
3235
-
3236
- //export api_VMCompatibilityShim_AddVariableToObject
3237
- func api_VMCompatibilityShim_AddVariableToObject(_handle CGoHandle, id *C.char, variable CGoHandle) *C.char {
3238
- _saved_thread := C.PyEval_SaveThread()
3239
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMCompatibilityShim")
3240
- if __err != nil {
3241
- return errorGoToPy(nil)
3242
- }
3243
- __err = gopyh.Embed(vifc, reflect.TypeOf(api.VMCompatibilityShim{})).(*api.VMCompatibilityShim).AddVariableToObject(C.GoString(id), ptrFromHandle_Ptr_api_ClassVariable(variable))
3244
-
3245
- C.PyEval_RestoreThread(_saved_thread)
3246
- if __err != nil {
3247
- estr := C.CString(__err.Error())
3248
- C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3249
- return estr
3250
- }
3251
- return C.CString("")
3252
- }
3253
-
3254
- // --- wrapping struct: api.ClassMethod ---
3255
- //
3256
- //export api_ClassMethod_CTor
3257
- func api_ClassMethod_CTor() CGoHandle {
3258
- return CGoHandle(handleFromPtr_api_ClassMethod(&api.ClassMethod{}))
3259
- }
3260
-
3261
- //export api_ClassMethod_Name_Get
3262
- func api_ClassMethod_Name_Get(handle CGoHandle) *C.char {
3263
- op := ptrFromHandle_api_ClassMethod(handle)
3264
- return C.CString(op.Name)
3265
- }
3266
-
3267
- //export api_ClassMethod_Name_Set
3268
- func api_ClassMethod_Name_Set(handle CGoHandle, val *C.char) {
3269
- op := ptrFromHandle_api_ClassMethod(handle)
3270
- op.Name = C.GoString(val)
3271
- }
3272
-
3273
- //export api_ClassMethod_Argc_Get
3274
- func api_ClassMethod_Argc_Get(handle CGoHandle) C.longlong {
3275
- op := ptrFromHandle_api_ClassMethod(handle)
3276
- return C.longlong(op.Argc)
3277
- }
3278
-
3279
- //export api_ClassMethod_Argc_Set
3280
- func api_ClassMethod_Argc_Set(handle CGoHandle, val C.longlong) {
3281
- op := ptrFromHandle_api_ClassMethod(handle)
3282
- op.Argc = int(val)
3283
- }
3284
-
3285
- // --- wrapping struct: api.ClassVariable ---
3286
- //
3287
- //export api_ClassVariable_CTor
3288
- func api_ClassVariable_CTor() CGoHandle {
3289
- return CGoHandle(handleFromPtr_api_ClassVariable(&api.ClassVariable{}))
3290
- }
3291
-
3292
- //export api_ClassVariable_Name_Get
3293
- func api_ClassVariable_Name_Get(handle CGoHandle) *C.char {
3294
- op := ptrFromHandle_api_ClassVariable(handle)
3295
- return C.CString(op.Name)
3296
- }
3297
-
3298
- //export api_ClassVariable_Name_Set
3299
- func api_ClassVariable_Name_Set(handle CGoHandle, val *C.char) {
3300
- op := ptrFromHandle_api_ClassVariable(handle)
3301
- op.Name = C.GoString(val)
3302
- }
3303
-
3304
- //export api_ClassVariable_Value_Get
3305
- func api_ClassVariable_Value_Get(handle CGoHandle) CGoHandle {
3306
- op := ptrFromHandle_api_ClassVariable(handle)
3307
- return handleFromPtr_api_GoValue(&op.Value)
3308
- }
3309
-
3310
- //export api_ClassVariable_Value_Set
3311
- func api_ClassVariable_Value_Set(handle CGoHandle, val CGoHandle) {
3312
- op := ptrFromHandle_api_ClassVariable(handle)
3313
- op.Value = *ptrFromHandle_api_GoValue(val)
3314
- }
3315
-
3316
- //export api_ClassVariable_Locked_Get
3317
- func api_ClassVariable_Locked_Get(handle CGoHandle) C.char {
3318
- op := ptrFromHandle_api_ClassVariable(handle)
3319
- return boolGoToPy(op.Locked)
3290
+ C.free(unsafe.Pointer(estr))
3291
+ return handleFromPtr_api_GoValue(nil)
3292
+ }
3293
+ return handleFromPtr_api_GoValue(&cret)
3320
3294
  }
3321
3295
 
3322
- //export api_ClassVariable_Locked_Set
3323
- func api_ClassVariable_Locked_Set(handle CGoHandle, val C.char) {
3324
- op := ptrFromHandle_api_ClassVariable(handle)
3325
- op.Locked = boolPyToGo(val)
3326
- }
3296
+ //export api_VMCompatibilityShim_GetObjectMRO
3297
+ func api_VMCompatibilityShim_GetObjectMRO(_handle CGoHandle, id *C.char) CGoHandle {
3298
+ _saved_thread := C.PyEval_SaveThread()
3299
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMCompatibilityShim")
3300
+ if __err != nil {
3301
+ return handleFromPtr_Slice_string(nil)
3302
+ }
3303
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VMCompatibilityShim{})).(*api.VMCompatibilityShim).GetObjectMRO(C.GoString(id))
3327
3304
 
3328
- // --- wrapping struct: api.SourceLocation ---
3329
- //
3330
- //export api_SourceLocation_CTor
3331
- func api_SourceLocation_CTor() CGoHandle {
3332
- return CGoHandle(handleFromPtr_api_SourceLocation(&api.SourceLocation{}))
3305
+ C.PyEval_RestoreThread(_saved_thread)
3306
+ if __err != nil {
3307
+ estr := C.CString(__err.Error())
3308
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3309
+ C.free(unsafe.Pointer(estr))
3310
+ return handleFromPtr_Slice_string(nil)
3311
+ }
3312
+ return handleFromPtr_Slice_string(&cret)
3333
3313
  }
3334
3314
 
3335
- //export api_SourceLocation_Filename_Get
3336
- func api_SourceLocation_Filename_Get(handle CGoHandle) *C.char {
3337
- op := ptrFromHandle_api_SourceLocation(handle)
3338
- return C.CString(op.Filename)
3339
- }
3315
+ //export api_VMCompatibilityShim_GetObjectImmediateFunctions
3316
+ func api_VMCompatibilityShim_GetObjectImmediateFunctions(_handle CGoHandle, id *C.char) CGoHandle {
3317
+ _saved_thread := C.PyEval_SaveThread()
3318
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMCompatibilityShim")
3319
+ if __err != nil {
3320
+ return handleFromPtr_Slice_string(nil)
3321
+ }
3322
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VMCompatibilityShim{})).(*api.VMCompatibilityShim).GetObjectImmediateFunctions(C.GoString(id))
3340
3323
 
3341
- //export api_SourceLocation_Filename_Set
3342
- func api_SourceLocation_Filename_Set(handle CGoHandle, val *C.char) {
3343
- op := ptrFromHandle_api_SourceLocation(handle)
3344
- op.Filename = C.GoString(val)
3324
+ C.PyEval_RestoreThread(_saved_thread)
3325
+ if __err != nil {
3326
+ estr := C.CString(__err.Error())
3327
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3328
+ C.free(unsafe.Pointer(estr))
3329
+ return handleFromPtr_Slice_string(nil)
3330
+ }
3331
+ return handleFromPtr_Slice_string(&cret)
3345
3332
  }
3346
3333
 
3347
- //export api_SourceLocation_Line_Get
3348
- func api_SourceLocation_Line_Get(handle CGoHandle) C.longlong {
3349
- op := ptrFromHandle_api_SourceLocation(handle)
3350
- return C.longlong(op.Line)
3351
- }
3334
+ //export api_VMCompatibilityShim_GetObjectImmediateVariables
3335
+ func api_VMCompatibilityShim_GetObjectImmediateVariables(_handle CGoHandle, id *C.char) CGoHandle {
3336
+ _saved_thread := C.PyEval_SaveThread()
3337
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMCompatibilityShim")
3338
+ if __err != nil {
3339
+ return handleFromPtr_Slice_string(nil)
3340
+ }
3341
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VMCompatibilityShim{})).(*api.VMCompatibilityShim).GetObjectImmediateVariables(C.GoString(id))
3352
3342
 
3353
- //export api_SourceLocation_Line_Set
3354
- func api_SourceLocation_Line_Set(handle CGoHandle, val C.longlong) {
3355
- op := ptrFromHandle_api_SourceLocation(handle)
3356
- op.Line = int(val)
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_Slice_string(nil)
3349
+ }
3350
+ return handleFromPtr_Slice_string(&cret)
3357
3351
  }
3358
3352
 
3359
- //export api_SourceLocation_Column_Get
3360
- func api_SourceLocation_Column_Get(handle CGoHandle) C.longlong {
3361
- op := ptrFromHandle_api_SourceLocation(handle)
3362
- return C.longlong(op.Column)
3363
- }
3353
+ //export api_VMCompatibilityShim_AddVariableToObject
3354
+ func api_VMCompatibilityShim_AddVariableToObject(_handle CGoHandle, id *C.char, variable CGoHandle) *C.char {
3355
+ _saved_thread := C.PyEval_SaveThread()
3356
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMCompatibilityShim")
3357
+ if __err != nil {
3358
+ return errorGoToPy(nil)
3359
+ }
3360
+ __err = gopyh.Embed(vifc, reflect.TypeOf(api.VMCompatibilityShim{})).(*api.VMCompatibilityShim).AddVariableToObject(C.GoString(id), ptrFromHandle_Ptr_api_ClassVariable(variable))
3364
3361
 
3365
- //export api_SourceLocation_Column_Set
3366
- func api_SourceLocation_Column_Set(handle CGoHandle, val C.longlong) {
3367
- op := ptrFromHandle_api_SourceLocation(handle)
3368
- op.Column = int(val)
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
3369
  }
3370
3370
 
3371
3371
  // ---- Slices ---
@@ -3374,67 +3374,56 @@ func api_SourceLocation_Column_Set(handle CGoHandle, val C.longlong) {
3374
3374
 
3375
3375
  // ---- Constructors ---
3376
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_NewCompileError
3386
- func api_NewCompileError(message *C.char, source CGoHandle) CGoHandle {
3387
- _saved_thread := C.PyEval_SaveThread()
3388
- defer C.PyEval_RestoreThread(_saved_thread)
3389
- return handleFromPtr_Ptr_api_VMError(api.NewCompileError(C.GoString(message), ptrFromHandle_Ptr_api_SourceLocation(source)))
3390
-
3391
- }
3392
-
3393
- //export api_NewConfigError
3394
- func api_NewConfigError(message *C.char, wrapped *C.char) CGoHandle {
3377
+ //export api_WrapAny
3378
+ func api_WrapAny(value *C.char) CGoHandle {
3395
3379
  _saved_thread := C.PyEval_SaveThread()
3396
3380
  defer C.PyEval_RestoreThread(_saved_thread)
3397
- return handleFromPtr_Ptr_api_VMError(api.NewConfigError(C.GoString(message), errors.New(C.GoString(wrapped))))
3381
+ cret := api.WrapAny(C.GoString(value))
3398
3382
 
3383
+ return handleFromPtr_api_GoValue(&cret)
3399
3384
  }
3400
3385
 
3401
- //export api_NewTimeoutError
3402
- func api_NewTimeoutError(duration C.longlong) CGoHandle {
3386
+ //export api_WrapInt
3387
+ func api_WrapInt(value C.longlong) CGoHandle {
3403
3388
  _saved_thread := C.PyEval_SaveThread()
3404
3389
  defer C.PyEval_RestoreThread(_saved_thread)
3405
- return handleFromPtr_Ptr_api_VMError(api.NewTimeoutError(time.Duration(int64(duration))))
3390
+ cret := api.WrapInt(int64(value))
3406
3391
 
3392
+ return handleFromPtr_api_GoValue(&cret)
3407
3393
  }
3408
3394
 
3409
- //export api_NewConversionError
3410
- func api_NewConversionError(message *C.char, wrapped *C.char) CGoHandle {
3395
+ //export api_WrapObject
3396
+ func api_WrapObject(value CGoHandle) CGoHandle {
3411
3397
  _saved_thread := C.PyEval_SaveThread()
3412
3398
  defer C.PyEval_RestoreThread(_saved_thread)
3413
- return handleFromPtr_Ptr_api_VMError(api.NewConversionError(C.GoString(message), errors.New(C.GoString(wrapped))))
3399
+ cret := api.WrapObject(ptrFromHandle_Ptr_environment_ObjectInstance(value))
3414
3400
 
3401
+ return handleFromPtr_api_GoValue(&cret)
3415
3402
  }
3416
3403
 
3417
- //export api_NewRuntimeError
3418
- func api_NewRuntimeError(message *C.char, source CGoHandle) CGoHandle {
3404
+ //export api_WrapFloat
3405
+ func api_WrapFloat(value C.double) CGoHandle {
3419
3406
  _saved_thread := C.PyEval_SaveThread()
3420
3407
  defer C.PyEval_RestoreThread(_saved_thread)
3421
- return handleFromPtr_Ptr_api_VMError(api.NewRuntimeError(C.GoString(message), ptrFromHandle_Ptr_api_SourceLocation(source)))
3408
+ cret := api.WrapFloat(float64(value))
3422
3409
 
3410
+ return handleFromPtr_api_GoValue(&cret)
3423
3411
  }
3424
3412
 
3425
- //export api_NewClassDefinition
3426
- func api_NewClassDefinition() CGoHandle {
3413
+ //export api_WrapBool
3414
+ func api_WrapBool(value C.char) CGoHandle {
3427
3415
  _saved_thread := C.PyEval_SaveThread()
3428
3416
  defer C.PyEval_RestoreThread(_saved_thread)
3429
- return handleFromPtr_Ptr_api_ClassDefinition(api.NewClassDefinition())
3417
+ cret := api.WrapBool(boolPyToGo(value))
3430
3418
 
3419
+ return handleFromPtr_api_GoValue(&cret)
3431
3420
  }
3432
3421
 
3433
- //export api_WrapAny
3434
- func api_WrapAny(value *C.char) CGoHandle {
3422
+ //export api_WrapString
3423
+ func api_WrapString(value *C.char) CGoHandle {
3435
3424
  _saved_thread := C.PyEval_SaveThread()
3436
3425
  defer C.PyEval_RestoreThread(_saved_thread)
3437
- cret := api.WrapAny(C.GoString(value))
3426
+ cret := api.WrapString(C.GoString(value))
3438
3427
 
3439
3428
  return handleFromPtr_api_GoValue(&cret)
3440
3429
  }
@@ -3454,68 +3443,94 @@ func api_ToGoValue(val CGoHandle) CGoHandle {
3454
3443
  return handleFromPtr_api_GoValue(&cret)
3455
3444
  }
3456
3445
 
3457
- //export api_WrapBool
3458
- func api_WrapBool(value C.char) CGoHandle {
3446
+ //export api_NewVM
3447
+ func api_NewVM(config CGoHandle) CGoHandle {
3448
+ _saved_thread := C.PyEval_SaveThread()
3449
+ cret, __err := api.NewVM(ptrFromHandle_Ptr_api_VMConfig(config))
3450
+
3451
+ C.PyEval_RestoreThread(_saved_thread)
3452
+ if __err != nil {
3453
+ estr := C.CString(__err.Error())
3454
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3455
+ C.free(unsafe.Pointer(estr))
3456
+ return handleFromPtr_Ptr_api_VM(nil)
3457
+ }
3458
+ return handleFromPtr_Ptr_api_VM(cret)
3459
+ }
3460
+
3461
+ //export api_DefaultConfig
3462
+ func api_DefaultConfig() CGoHandle {
3459
3463
  _saved_thread := C.PyEval_SaveThread()
3460
3464
  defer C.PyEval_RestoreThread(_saved_thread)
3461
- cret := api.WrapBool(boolPyToGo(value))
3465
+ return handleFromPtr_Ptr_api_VMConfig(api.DefaultConfig())
3462
3466
 
3463
- return handleFromPtr_api_GoValue(&cret)
3464
3467
  }
3465
3468
 
3466
- //export api_WrapFloat
3467
- func api_WrapFloat(value C.double) CGoHandle {
3469
+ //export api_NewClassDefinition
3470
+ func api_NewClassDefinition() CGoHandle {
3468
3471
  _saved_thread := C.PyEval_SaveThread()
3469
3472
  defer C.PyEval_RestoreThread(_saved_thread)
3470
- cret := api.WrapFloat(float64(value))
3473
+ return handleFromPtr_Ptr_api_ClassDefinition(api.NewClassDefinition())
3471
3474
 
3472
- return handleFromPtr_api_GoValue(&cret)
3473
3475
  }
3474
3476
 
3475
- //export api_WrapString
3476
- func api_WrapString(value *C.char) CGoHandle {
3477
+ //export api_NewCompileError
3478
+ func api_NewCompileError(message *C.char, source CGoHandle) CGoHandle {
3477
3479
  _saved_thread := C.PyEval_SaveThread()
3478
3480
  defer C.PyEval_RestoreThread(_saved_thread)
3479
- cret := api.WrapString(C.GoString(value))
3481
+ return handleFromPtr_Ptr_api_VMError(api.NewCompileError(C.GoString(message), ptrFromHandle_Ptr_api_SourceLocation(source)))
3480
3482
 
3481
- return handleFromPtr_api_GoValue(&cret)
3482
3483
  }
3483
3484
 
3484
- //export api_WrapInt
3485
- func api_WrapInt(value C.longlong) CGoHandle {
3485
+ //export api_NewConfigError
3486
+ func api_NewConfigError(message *C.char, wrapped *C.char) CGoHandle {
3486
3487
  _saved_thread := C.PyEval_SaveThread()
3487
3488
  defer C.PyEval_RestoreThread(_saved_thread)
3488
- cret := api.WrapInt(int64(value))
3489
+ return handleFromPtr_Ptr_api_VMError(api.NewConfigError(C.GoString(message), errors.New(C.GoString(wrapped))))
3489
3490
 
3490
- return handleFromPtr_api_GoValue(&cret)
3491
3491
  }
3492
3492
 
3493
- //export api_WrapObject
3494
- func api_WrapObject(value CGoHandle) CGoHandle {
3493
+ //export api_NewConversionError
3494
+ func api_NewConversionError(message *C.char, wrapped *C.char) CGoHandle {
3495
3495
  _saved_thread := C.PyEval_SaveThread()
3496
3496
  defer C.PyEval_RestoreThread(_saved_thread)
3497
- cret := api.WrapObject(ptrFromHandle_Ptr_environment_ObjectInstance(value))
3497
+ return handleFromPtr_Ptr_api_VMError(api.NewConversionError(C.GoString(message), errors.New(C.GoString(wrapped))))
3498
3498
 
3499
- return handleFromPtr_api_GoValue(&cret)
3500
3499
  }
3501
3500
 
3502
- //export api_NewVM
3503
- func api_NewVM(config CGoHandle) CGoHandle {
3501
+ //export api_NewRuntimeError
3502
+ func api_NewRuntimeError(message *C.char, source CGoHandle) CGoHandle {
3504
3503
  _saved_thread := C.PyEval_SaveThread()
3505
- cret, __err := api.NewVM(ptrFromHandle_Ptr_api_VMConfig(config))
3504
+ defer C.PyEval_RestoreThread(_saved_thread)
3505
+ return handleFromPtr_Ptr_api_VMError(api.NewRuntimeError(C.GoString(message), ptrFromHandle_Ptr_api_SourceLocation(source)))
3506
+
3507
+ }
3508
+
3509
+ //export api_NewTimeoutError
3510
+ func api_NewTimeoutError(duration C.longlong) CGoHandle {
3511
+ _saved_thread := C.PyEval_SaveThread()
3512
+ defer C.PyEval_RestoreThread(_saved_thread)
3513
+ return handleFromPtr_Ptr_api_VMError(api.NewTimeoutError(time.Duration(int64(duration))))
3514
+
3515
+ }
3516
+
3517
+ // ---- Functions ---
3518
+
3519
+ //export api_FromGoValue
3520
+ func api_FromGoValue(val CGoHandle) CGoHandle {
3521
+ _saved_thread := C.PyEval_SaveThread()
3522
+ cret, __err := api.FromGoValue(*ptrFromHandle_api_GoValue(val))
3506
3523
 
3507
3524
  C.PyEval_RestoreThread(_saved_thread)
3508
3525
  if __err != nil {
3509
3526
  estr := C.CString(__err.Error())
3510
3527
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3511
3528
  C.free(unsafe.Pointer(estr))
3512
- return handleFromPtr_Ptr_api_VM(nil)
3529
+ return handleFromPtr_environment_Value(nil)
3513
3530
  }
3514
- return handleFromPtr_Ptr_api_VM(cret)
3531
+ return handleFromPtr_environment_Value(cret)
3515
3532
  }
3516
3533
 
3517
- // ---- Functions ---
3518
-
3519
3534
  //export api_LookupObject
3520
3535
  func api_LookupObject(id *C.char) CGoHandle {
3521
3536
  _saved_thread := C.PyEval_SaveThread()
@@ -3545,18 +3560,3 @@ func api_ConvertArguments(args CGoHandle) CGoHandle {
3545
3560
  }
3546
3561
  return handleFromPtr_Slice_environment_Value(&cret)
3547
3562
  }
3548
-
3549
- //export api_FromGoValue
3550
- func api_FromGoValue(val CGoHandle) CGoHandle {
3551
- _saved_thread := C.PyEval_SaveThread()
3552
- cret, __err := api.FromGoValue(*ptrFromHandle_api_GoValue(val))
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_environment_Value(nil)
3560
- }
3561
- return handleFromPtr_environment_Value(cret)
3562
- }