objective-lol 0.0.1__cp310-cp310-macosx_11_0_arm64.whl → 0.0.2__cp310-cp310-macosx_11_0_arm64.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,273 +2272,374 @@ func Map_string_api_GoValue_keys(handle CGoHandle) CGoHandle {
2272
2272
 
2273
2273
  // ---- Structs ---
2274
2274
 
2275
- // --- wrapping struct: api.ClassVariable ---
2275
+ // --- wrapping struct: api.VMError ---
2276
2276
  //
2277
- //export api_ClassVariable_CTor
2278
- func api_ClassVariable_CTor() CGoHandle {
2279
- return CGoHandle(handleFromPtr_api_ClassVariable(&api.ClassVariable{}))
2277
+ //export api_VMError_CTor
2278
+ func api_VMError_CTor() CGoHandle {
2279
+ return CGoHandle(handleFromPtr_api_VMError(&api.VMError{}))
2280
2280
  }
2281
2281
 
2282
- //export api_ClassVariable_Name_Get
2283
- func api_ClassVariable_Name_Get(handle CGoHandle) *C.char {
2284
- op := ptrFromHandle_api_ClassVariable(handle)
2285
- return C.CString(op.Name)
2282
+ //export api_VMError_Type_Get
2283
+ func api_VMError_Type_Get(handle CGoHandle) *C.char {
2284
+ op := ptrFromHandle_api_VMError(handle)
2285
+ return C.CString(string(op.Type))
2286
2286
  }
2287
2287
 
2288
- //export api_ClassVariable_Name_Set
2289
- func api_ClassVariable_Name_Set(handle CGoHandle, val *C.char) {
2290
- op := ptrFromHandle_api_ClassVariable(handle)
2291
- op.Name = C.GoString(val)
2288
+ //export api_VMError_Type_Set
2289
+ func api_VMError_Type_Set(handle CGoHandle, val *C.char) {
2290
+ op := ptrFromHandle_api_VMError(handle)
2291
+ op.Type = api.ErrorType(C.GoString(val))
2292
2292
  }
2293
2293
 
2294
- //export api_ClassVariable_Value_Get
2295
- func api_ClassVariable_Value_Get(handle CGoHandle) CGoHandle {
2296
- op := ptrFromHandle_api_ClassVariable(handle)
2297
- return handleFromPtr_api_GoValue(&op.Value)
2294
+ //export api_VMError_Message_Get
2295
+ func api_VMError_Message_Get(handle CGoHandle) *C.char {
2296
+ op := ptrFromHandle_api_VMError(handle)
2297
+ return C.CString(op.Message)
2298
2298
  }
2299
2299
 
2300
- //export api_ClassVariable_Value_Set
2301
- func api_ClassVariable_Value_Set(handle CGoHandle, val CGoHandle) {
2302
- op := ptrFromHandle_api_ClassVariable(handle)
2303
- op.Value = *ptrFromHandle_api_GoValue(val)
2300
+ //export api_VMError_Message_Set
2301
+ func api_VMError_Message_Set(handle CGoHandle, val *C.char) {
2302
+ op := ptrFromHandle_api_VMError(handle)
2303
+ op.Message = C.GoString(val)
2304
2304
  }
2305
2305
 
2306
- //export api_ClassVariable_Locked_Get
2307
- func api_ClassVariable_Locked_Get(handle CGoHandle) C.char {
2308
- op := ptrFromHandle_api_ClassVariable(handle)
2309
- return boolGoToPy(op.Locked)
2306
+ //export api_VMError_Source_Get
2307
+ func api_VMError_Source_Get(handle CGoHandle) CGoHandle {
2308
+ op := ptrFromHandle_api_VMError(handle)
2309
+ return handleFromPtr_Ptr_api_SourceLocation(op.Source)
2310
2310
  }
2311
2311
 
2312
- //export api_ClassVariable_Locked_Set
2313
- func api_ClassVariable_Locked_Set(handle CGoHandle, val C.char) {
2314
- op := ptrFromHandle_api_ClassVariable(handle)
2315
- op.Locked = boolPyToGo(val)
2312
+ //export api_VMError_Source_Set
2313
+ func api_VMError_Source_Set(handle CGoHandle, val CGoHandle) {
2314
+ op := ptrFromHandle_api_VMError(handle)
2315
+ op.Source = ptrFromHandle_Ptr_api_SourceLocation(val)
2316
2316
  }
2317
2317
 
2318
- // --- wrapping struct: api.GoValue ---
2319
- //
2320
- //export api_GoValue_CTor
2321
- func api_GoValue_CTor() CGoHandle {
2322
- return CGoHandle(handleFromPtr_api_GoValue(&api.GoValue{}))
2318
+ //export api_VMError_Duration_Get
2319
+ func api_VMError_Duration_Get(handle CGoHandle) C.longlong {
2320
+ op := ptrFromHandle_api_VMError(handle)
2321
+ return C.longlong(int64(op.Duration))
2323
2322
  }
2324
2323
 
2325
- //export api_GoValue_ID
2326
- func api_GoValue_ID(_handle CGoHandle) *C.char {
2324
+ //export api_VMError_Duration_Set
2325
+ func api_VMError_Duration_Set(handle CGoHandle, val C.longlong) {
2326
+ op := ptrFromHandle_api_VMError(handle)
2327
+ op.Duration = time.Duration(int64(val))
2328
+ }
2329
+
2330
+ //export api_VMError_Error
2331
+ func api_VMError_Error(_handle CGoHandle) *C.char {
2327
2332
  _saved_thread := C.PyEval_SaveThread()
2328
2333
  defer C.PyEval_RestoreThread(_saved_thread)
2329
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2334
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2330
2335
  if __err != nil {
2331
2336
  return C.CString("")
2332
2337
  }
2333
- return C.CString(gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).ID())
2338
+ return C.CString(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).Error())
2334
2339
 
2335
2340
  }
2336
2341
 
2337
- //export api_GoValue_MarshalJSON
2338
- func api_GoValue_MarshalJSON(_handle CGoHandle) CGoHandle {
2342
+ //export api_VMError_Unwrap
2343
+ func api_VMError_Unwrap(_handle CGoHandle) *C.char {
2339
2344
  _saved_thread := C.PyEval_SaveThread()
2340
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2345
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2341
2346
  if __err != nil {
2342
- return handleFromPtr_Slice_byte(nil)
2347
+ return errorGoToPy(nil)
2343
2348
  }
2344
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).MarshalJSON()
2349
+ __err = gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).Unwrap()
2345
2350
 
2346
2351
  C.PyEval_RestoreThread(_saved_thread)
2347
2352
  if __err != nil {
2348
2353
  estr := C.CString(__err.Error())
2349
2354
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2350
- C.free(unsafe.Pointer(estr))
2351
- return handleFromPtr_Slice_byte(nil)
2355
+ return estr
2352
2356
  }
2353
- return handleFromPtr_Slice_byte(&cret)
2357
+ return C.CString("")
2354
2358
  }
2355
2359
 
2356
- //export api_GoValue_Type
2357
- func api_GoValue_Type(_handle CGoHandle) *C.char {
2360
+ //export api_VMError_IsCompileError
2361
+ func api_VMError_IsCompileError(_handle CGoHandle) C.char {
2358
2362
  _saved_thread := C.PyEval_SaveThread()
2359
2363
  defer C.PyEval_RestoreThread(_saved_thread)
2360
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2364
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2361
2365
  if __err != nil {
2362
- return C.CString("")
2366
+ return boolGoToPy(false)
2363
2367
  }
2364
- return C.CString(gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Type())
2368
+ return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsCompileError())
2365
2369
 
2366
2370
  }
2367
2371
 
2368
- //export api_GoValue_Int
2369
- func api_GoValue_Int(_handle CGoHandle) C.longlong {
2372
+ //export api_VMError_IsRuntimeError
2373
+ func api_VMError_IsRuntimeError(_handle CGoHandle) C.char {
2370
2374
  _saved_thread := C.PyEval_SaveThread()
2371
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2375
+ defer C.PyEval_RestoreThread(_saved_thread)
2376
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2372
2377
  if __err != nil {
2373
- return C.longlong(0)
2378
+ return boolGoToPy(false)
2374
2379
  }
2375
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Int()
2380
+ return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsRuntimeError())
2381
+
2382
+ }
2383
+
2384
+ //export api_VMError_IsTimeoutError
2385
+ func api_VMError_IsTimeoutError(_handle CGoHandle) C.char {
2386
+ _saved_thread := C.PyEval_SaveThread()
2387
+ defer C.PyEval_RestoreThread(_saved_thread)
2388
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2389
+ if __err != nil {
2390
+ return boolGoToPy(false)
2391
+ }
2392
+ return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsTimeoutError())
2393
+
2394
+ }
2395
+
2396
+ //export api_VMError_IsConversionError
2397
+ func api_VMError_IsConversionError(_handle CGoHandle) C.char {
2398
+ _saved_thread := C.PyEval_SaveThread()
2399
+ defer C.PyEval_RestoreThread(_saved_thread)
2400
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2401
+ if __err != nil {
2402
+ return boolGoToPy(false)
2403
+ }
2404
+ return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsConversionError())
2405
+
2406
+ }
2407
+
2408
+ //export api_VMError_IsConfigError
2409
+ func api_VMError_IsConfigError(_handle CGoHandle) C.char {
2410
+ _saved_thread := C.PyEval_SaveThread()
2411
+ defer C.PyEval_RestoreThread(_saved_thread)
2412
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2413
+ if __err != nil {
2414
+ return boolGoToPy(false)
2415
+ }
2416
+ return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsConfigError())
2417
+
2418
+ }
2419
+
2420
+ // --- wrapping struct: api.ClassMethod ---
2421
+ //
2422
+ //export api_ClassMethod_CTor
2423
+ func api_ClassMethod_CTor() CGoHandle {
2424
+ return CGoHandle(handleFromPtr_api_ClassMethod(&api.ClassMethod{}))
2425
+ }
2426
+
2427
+ //export api_ClassMethod_Name_Get
2428
+ func api_ClassMethod_Name_Get(handle CGoHandle) *C.char {
2429
+ op := ptrFromHandle_api_ClassMethod(handle)
2430
+ return C.CString(op.Name)
2431
+ }
2432
+
2433
+ //export api_ClassMethod_Name_Set
2434
+ func api_ClassMethod_Name_Set(handle CGoHandle, val *C.char) {
2435
+ op := ptrFromHandle_api_ClassMethod(handle)
2436
+ op.Name = C.GoString(val)
2437
+ }
2438
+
2439
+ //export api_ClassMethod_Argc_Get
2440
+ func api_ClassMethod_Argc_Get(handle CGoHandle) C.longlong {
2441
+ op := ptrFromHandle_api_ClassMethod(handle)
2442
+ return C.longlong(op.Argc)
2443
+ }
2444
+
2445
+ //export api_ClassMethod_Argc_Set
2446
+ func api_ClassMethod_Argc_Set(handle CGoHandle, val C.longlong) {
2447
+ op := ptrFromHandle_api_ClassMethod(handle)
2448
+ op.Argc = int(val)
2449
+ }
2450
+
2451
+ // --- wrapping struct: api.UnknownFunctionHandler ---
2452
+ //
2453
+ //export api_UnknownFunctionHandler_CTor
2454
+ func api_UnknownFunctionHandler_CTor() CGoHandle {
2455
+ return CGoHandle(handleFromPtr_api_UnknownFunctionHandler(&api.UnknownFunctionHandler{}))
2456
+ }
2457
+
2458
+ // --- wrapping struct: api.VM ---
2459
+ //
2460
+ //export api_VM_CTor
2461
+ func api_VM_CTor() CGoHandle {
2462
+ return CGoHandle(handleFromPtr_api_VM(&api.VM{}))
2463
+ }
2464
+
2465
+ //export api_VM_GetCompatibilityShim
2466
+ func api_VM_GetCompatibilityShim(_handle CGoHandle) CGoHandle {
2467
+ _saved_thread := C.PyEval_SaveThread()
2468
+ defer C.PyEval_RestoreThread(_saved_thread)
2469
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2470
+ if __err != nil {
2471
+ return handleFromPtr_Ptr_api_VMCompatibilityShim(nil)
2472
+ }
2473
+ return handleFromPtr_Ptr_api_VMCompatibilityShim(gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).GetCompatibilityShim())
2474
+
2475
+ }
2476
+
2477
+ //export api_VM_Execute
2478
+ func api_VM_Execute(_handle CGoHandle, code *C.char) CGoHandle {
2479
+ _saved_thread := C.PyEval_SaveThread()
2480
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2481
+ if __err != nil {
2482
+ return handleFromPtr_Ptr_api_ExecutionResult(nil)
2483
+ }
2484
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).Execute(C.GoString(code))
2376
2485
 
2377
2486
  C.PyEval_RestoreThread(_saved_thread)
2378
2487
  if __err != nil {
2379
2488
  estr := C.CString(__err.Error())
2380
2489
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2381
2490
  C.free(unsafe.Pointer(estr))
2382
- return C.longlong(0)
2491
+ return handleFromPtr_Ptr_api_ExecutionResult(nil)
2383
2492
  }
2384
- return C.longlong(cret)
2493
+ return handleFromPtr_Ptr_api_ExecutionResult(cret)
2385
2494
  }
2386
2495
 
2387
- //export api_GoValue_Float
2388
- func api_GoValue_Float(_handle CGoHandle) C.double {
2496
+ //export api_VM_ExecuteWithContext
2497
+ func api_VM_ExecuteWithContext(_handle CGoHandle, ctx CGoHandle, code *C.char) CGoHandle {
2389
2498
  _saved_thread := C.PyEval_SaveThread()
2390
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2499
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2391
2500
  if __err != nil {
2392
- return C.double(0)
2501
+ return handleFromPtr_Ptr_api_ExecutionResult(nil)
2393
2502
  }
2394
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Float()
2503
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).ExecuteWithContext(ptrFromHandle_context_Context(ctx), C.GoString(code))
2395
2504
 
2396
2505
  C.PyEval_RestoreThread(_saved_thread)
2397
2506
  if __err != nil {
2398
2507
  estr := C.CString(__err.Error())
2399
2508
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2400
2509
  C.free(unsafe.Pointer(estr))
2401
- return C.double(0)
2510
+ return handleFromPtr_Ptr_api_ExecutionResult(nil)
2402
2511
  }
2403
- return C.double(cret)
2512
+ return handleFromPtr_Ptr_api_ExecutionResult(cret)
2404
2513
  }
2405
2514
 
2406
- //export api_GoValue_String
2407
- func api_GoValue_String(_handle CGoHandle) *C.char {
2515
+ //export api_VM_NewObjectInstance
2516
+ func api_VM_NewObjectInstance(_handle CGoHandle, className *C.char) CGoHandle {
2408
2517
  _saved_thread := C.PyEval_SaveThread()
2409
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2518
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2410
2519
  if __err != nil {
2411
- return C.CString("")
2520
+ return handleFromPtr_api_GoValue(nil)
2412
2521
  }
2413
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).String()
2522
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).NewObjectInstance(C.GoString(className))
2414
2523
 
2415
2524
  C.PyEval_RestoreThread(_saved_thread)
2416
2525
  if __err != nil {
2417
2526
  estr := C.CString(__err.Error())
2418
2527
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2419
2528
  C.free(unsafe.Pointer(estr))
2420
- return C.CString("")
2529
+ return handleFromPtr_api_GoValue(nil)
2421
2530
  }
2422
- return C.CString(cret)
2531
+ return handleFromPtr_api_GoValue(&cret)
2423
2532
  }
2424
2533
 
2425
- //export api_GoValue_Bool
2426
- func api_GoValue_Bool(_handle CGoHandle) C.char {
2534
+ //export api_VM_Call
2535
+ func api_VM_Call(_handle CGoHandle, functionName *C.char, args CGoHandle) CGoHandle {
2427
2536
  _saved_thread := C.PyEval_SaveThread()
2428
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2537
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2429
2538
  if __err != nil {
2430
- return boolGoToPy(false)
2539
+ return handleFromPtr_api_GoValue(nil)
2431
2540
  }
2432
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Bool()
2541
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).Call(C.GoString(functionName), deptrFromHandle_Slice_api_GoValue(args))
2433
2542
 
2434
2543
  C.PyEval_RestoreThread(_saved_thread)
2435
2544
  if __err != nil {
2436
2545
  estr := C.CString(__err.Error())
2437
2546
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2438
2547
  C.free(unsafe.Pointer(estr))
2439
- return boolGoToPy(false)
2548
+ return handleFromPtr_api_GoValue(nil)
2440
2549
  }
2441
- return boolGoToPy(cret)
2550
+ return handleFromPtr_api_GoValue(&cret)
2442
2551
  }
2443
2552
 
2444
- //export api_GoValue_Slice
2445
- func api_GoValue_Slice(_handle CGoHandle) CGoHandle {
2553
+ //export api_VM_CallMethod
2554
+ func api_VM_CallMethod(_handle CGoHandle, object CGoHandle, methodName *C.char, args CGoHandle) CGoHandle {
2446
2555
  _saved_thread := C.PyEval_SaveThread()
2447
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2556
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2448
2557
  if __err != nil {
2449
- return handleFromPtr_Slice_api_GoValue(nil)
2558
+ return handleFromPtr_api_GoValue(nil)
2450
2559
  }
2451
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Slice()
2560
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).CallMethod(*ptrFromHandle_api_GoValue(object), C.GoString(methodName), deptrFromHandle_Slice_api_GoValue(args))
2452
2561
 
2453
2562
  C.PyEval_RestoreThread(_saved_thread)
2454
2563
  if __err != nil {
2455
2564
  estr := C.CString(__err.Error())
2456
2565
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2457
2566
  C.free(unsafe.Pointer(estr))
2458
- return handleFromPtr_Slice_api_GoValue(nil)
2567
+ return handleFromPtr_api_GoValue(nil)
2459
2568
  }
2460
- return handleFromPtr_Slice_api_GoValue(&cret)
2569
+ return handleFromPtr_api_GoValue(&cret)
2461
2570
  }
2462
2571
 
2463
- //export api_GoValue_Map
2464
- func api_GoValue_Map(_handle CGoHandle) CGoHandle {
2572
+ //export api_VM_DefineVariable
2573
+ func api_VM_DefineVariable(_handle CGoHandle, name *C.char, value CGoHandle, constant C.char) *C.char {
2574
+ _saved_thread := C.PyEval_SaveThread()
2575
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2576
+ if __err != nil {
2577
+ return errorGoToPy(nil)
2578
+ }
2579
+ __err = gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).DefineVariable(C.GoString(name), *ptrFromHandle_api_GoValue(value), boolPyToGo(constant))
2580
+
2581
+ C.PyEval_RestoreThread(_saved_thread)
2582
+ if __err != nil {
2583
+ estr := C.CString(__err.Error())
2584
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2585
+ return estr
2586
+ }
2587
+ return C.CString("")
2588
+ }
2589
+
2590
+ //export api_VM_SetVariable
2591
+ func api_VM_SetVariable(_handle CGoHandle, variableName *C.char, value CGoHandle) *C.char {
2592
+ _saved_thread := C.PyEval_SaveThread()
2593
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2594
+ if __err != nil {
2595
+ return errorGoToPy(nil)
2596
+ }
2597
+ __err = gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).SetVariable(C.GoString(variableName), *ptrFromHandle_api_GoValue(value))
2598
+
2599
+ C.PyEval_RestoreThread(_saved_thread)
2600
+ if __err != nil {
2601
+ estr := C.CString(__err.Error())
2602
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2603
+ return estr
2604
+ }
2605
+ return C.CString("")
2606
+ }
2607
+
2608
+ //export api_VM_GetVariable
2609
+ func api_VM_GetVariable(_handle CGoHandle, variableName *C.char) CGoHandle {
2465
2610
  _saved_thread := C.PyEval_SaveThread()
2466
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2611
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2467
2612
  if __err != nil {
2468
- return handleFromPtr_Map_string_api_GoValue(nil)
2613
+ return handleFromPtr_api_GoValue(nil)
2469
2614
  }
2470
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Map()
2615
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).GetVariable(C.GoString(variableName))
2471
2616
 
2472
2617
  C.PyEval_RestoreThread(_saved_thread)
2473
2618
  if __err != nil {
2474
2619
  estr := C.CString(__err.Error())
2475
2620
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2476
2621
  C.free(unsafe.Pointer(estr))
2477
- return handleFromPtr_Map_string_api_GoValue(nil)
2622
+ return handleFromPtr_api_GoValue(nil)
2478
2623
  }
2479
- return handleFromPtr_Map_string_api_GoValue(&cret)
2624
+ return handleFromPtr_api_GoValue(&cret)
2480
2625
  }
2481
2626
 
2482
- //export api_GoValue_Object
2483
- func api_GoValue_Object(_handle CGoHandle) CGoHandle {
2627
+ //export api_VM_DefineClass
2628
+ func api_VM_DefineClass(_handle CGoHandle, classDef CGoHandle) *C.char {
2484
2629
  _saved_thread := C.PyEval_SaveThread()
2485
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2630
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2486
2631
  if __err != nil {
2487
- return handleFromPtr_Ptr_environment_ObjectInstance(nil)
2632
+ return errorGoToPy(nil)
2488
2633
  }
2489
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Object()
2634
+ __err = gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).DefineClass(ptrFromHandle_Ptr_api_ClassDefinition(classDef))
2490
2635
 
2491
2636
  C.PyEval_RestoreThread(_saved_thread)
2492
2637
  if __err != nil {
2493
2638
  estr := C.CString(__err.Error())
2494
2639
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2495
- C.free(unsafe.Pointer(estr))
2496
- return handleFromPtr_Ptr_environment_ObjectInstance(nil)
2640
+ return estr
2497
2641
  }
2498
- return handleFromPtr_Ptr_environment_ObjectInstance(cret)
2499
- }
2500
-
2501
- // --- wrapping struct: api.SourceLocation ---
2502
- //
2503
- //export api_SourceLocation_CTor
2504
- func api_SourceLocation_CTor() CGoHandle {
2505
- return CGoHandle(handleFromPtr_api_SourceLocation(&api.SourceLocation{}))
2506
- }
2507
-
2508
- //export api_SourceLocation_Filename_Get
2509
- func api_SourceLocation_Filename_Get(handle CGoHandle) *C.char {
2510
- op := ptrFromHandle_api_SourceLocation(handle)
2511
- return C.CString(op.Filename)
2512
- }
2513
-
2514
- //export api_SourceLocation_Filename_Set
2515
- func api_SourceLocation_Filename_Set(handle CGoHandle, val *C.char) {
2516
- op := ptrFromHandle_api_SourceLocation(handle)
2517
- op.Filename = C.GoString(val)
2518
- }
2519
-
2520
- //export api_SourceLocation_Line_Get
2521
- func api_SourceLocation_Line_Get(handle CGoHandle) C.longlong {
2522
- op := ptrFromHandle_api_SourceLocation(handle)
2523
- return C.longlong(op.Line)
2524
- }
2525
-
2526
- //export api_SourceLocation_Line_Set
2527
- func api_SourceLocation_Line_Set(handle CGoHandle, val C.longlong) {
2528
- op := ptrFromHandle_api_SourceLocation(handle)
2529
- op.Line = int(val)
2530
- }
2531
-
2532
- //export api_SourceLocation_Column_Get
2533
- func api_SourceLocation_Column_Get(handle CGoHandle) C.longlong {
2534
- op := ptrFromHandle_api_SourceLocation(handle)
2535
- return C.longlong(op.Column)
2536
- }
2537
-
2538
- //export api_SourceLocation_Column_Set
2539
- func api_SourceLocation_Column_Set(handle CGoHandle, val C.longlong) {
2540
- op := ptrFromHandle_api_SourceLocation(handle)
2541
- op.Column = int(val)
2642
+ return C.CString("")
2542
2643
  }
2543
2644
 
2544
2645
  // --- wrapping struct: api.VMCompatibilityShim ---
@@ -2791,222 +2892,120 @@ func api_VMCompatibilityShim_AddVariableToObject(_handle CGoHandle, id *C.char,
2791
2892
  return C.CString("")
2792
2893
  }
2793
2894
 
2794
- // --- wrapping struct: api.VMConfig ---
2895
+ // --- wrapping struct: api.SourceLocation ---
2795
2896
  //
2796
- //export api_VMConfig_CTor
2797
- func api_VMConfig_CTor() CGoHandle {
2798
- return CGoHandle(handleFromPtr_api_VMConfig(&api.VMConfig{}))
2799
- }
2800
-
2801
- //export api_VMConfig_Stdout_Get
2802
- func api_VMConfig_Stdout_Get(handle CGoHandle) CGoHandle {
2803
- op := ptrFromHandle_api_VMConfig(handle)
2804
- return handleFromPtr_io_Writer(op.Stdout)
2805
- }
2806
-
2807
- //export api_VMConfig_Stdout_Set
2808
- func api_VMConfig_Stdout_Set(handle CGoHandle, val CGoHandle) {
2809
- op := ptrFromHandle_api_VMConfig(handle)
2810
- op.Stdout = ptrFromHandle_io_Writer(val)
2811
- }
2812
-
2813
- //export api_VMConfig_Stdin_Get
2814
- func api_VMConfig_Stdin_Get(handle CGoHandle) CGoHandle {
2815
- op := ptrFromHandle_api_VMConfig(handle)
2816
- return handleFromPtr_io_Reader(op.Stdin)
2897
+ //export api_SourceLocation_CTor
2898
+ func api_SourceLocation_CTor() CGoHandle {
2899
+ return CGoHandle(handleFromPtr_api_SourceLocation(&api.SourceLocation{}))
2817
2900
  }
2818
2901
 
2819
- //export api_VMConfig_Stdin_Set
2820
- func api_VMConfig_Stdin_Set(handle CGoHandle, val CGoHandle) {
2821
- op := ptrFromHandle_api_VMConfig(handle)
2822
- op.Stdin = ptrFromHandle_io_Reader(val)
2902
+ //export api_SourceLocation_Filename_Get
2903
+ func api_SourceLocation_Filename_Get(handle CGoHandle) *C.char {
2904
+ op := ptrFromHandle_api_SourceLocation(handle)
2905
+ return C.CString(op.Filename)
2823
2906
  }
2824
2907
 
2825
- //export api_VMConfig_Timeout_Get
2826
- func api_VMConfig_Timeout_Get(handle CGoHandle) C.longlong {
2827
- op := ptrFromHandle_api_VMConfig(handle)
2828
- return C.longlong(int64(op.Timeout))
2908
+ //export api_SourceLocation_Filename_Set
2909
+ func api_SourceLocation_Filename_Set(handle CGoHandle, val *C.char) {
2910
+ op := ptrFromHandle_api_SourceLocation(handle)
2911
+ op.Filename = C.GoString(val)
2829
2912
  }
2830
2913
 
2831
- //export api_VMConfig_Timeout_Set
2832
- func api_VMConfig_Timeout_Set(handle CGoHandle, val C.longlong) {
2833
- op := ptrFromHandle_api_VMConfig(handle)
2834
- op.Timeout = time.Duration(int64(val))
2914
+ //export api_SourceLocation_Line_Get
2915
+ func api_SourceLocation_Line_Get(handle CGoHandle) C.longlong {
2916
+ op := ptrFromHandle_api_SourceLocation(handle)
2917
+ return C.longlong(op.Line)
2835
2918
  }
2836
2919
 
2837
- //export api_VMConfig_WorkingDirectory_Get
2838
- func api_VMConfig_WorkingDirectory_Get(handle CGoHandle) *C.char {
2839
- op := ptrFromHandle_api_VMConfig(handle)
2840
- return C.CString(op.WorkingDirectory)
2920
+ //export api_SourceLocation_Line_Set
2921
+ func api_SourceLocation_Line_Set(handle CGoHandle, val C.longlong) {
2922
+ op := ptrFromHandle_api_SourceLocation(handle)
2923
+ op.Line = int(val)
2841
2924
  }
2842
2925
 
2843
- //export api_VMConfig_WorkingDirectory_Set
2844
- func api_VMConfig_WorkingDirectory_Set(handle CGoHandle, val *C.char) {
2845
- op := ptrFromHandle_api_VMConfig(handle)
2846
- op.WorkingDirectory = C.GoString(val)
2926
+ //export api_SourceLocation_Column_Get
2927
+ func api_SourceLocation_Column_Get(handle CGoHandle) C.longlong {
2928
+ op := ptrFromHandle_api_SourceLocation(handle)
2929
+ return C.longlong(op.Column)
2847
2930
  }
2848
2931
 
2849
- //export api_VMConfig_Validate
2850
- func api_VMConfig_Validate(_handle CGoHandle) *C.char {
2851
- _saved_thread := C.PyEval_SaveThread()
2852
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMConfig")
2853
- if __err != nil {
2854
- return errorGoToPy(nil)
2855
- }
2856
- __err = gopyh.Embed(vifc, reflect.TypeOf(api.VMConfig{})).(*api.VMConfig).Validate()
2857
-
2858
- C.PyEval_RestoreThread(_saved_thread)
2859
- if __err != nil {
2860
- estr := C.CString(__err.Error())
2861
- C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2862
- return estr
2863
- }
2864
- return C.CString("")
2932
+ //export api_SourceLocation_Column_Set
2933
+ func api_SourceLocation_Column_Set(handle CGoHandle, val C.longlong) {
2934
+ op := ptrFromHandle_api_SourceLocation(handle)
2935
+ op.Column = int(val)
2865
2936
  }
2866
2937
 
2867
- // --- wrapping struct: api.VMError ---
2938
+ // --- wrapping struct: api.VMConfig ---
2868
2939
  //
2869
- //export api_VMError_CTor
2870
- func api_VMError_CTor() CGoHandle {
2871
- return CGoHandle(handleFromPtr_api_VMError(&api.VMError{}))
2872
- }
2873
-
2874
- //export api_VMError_Type_Get
2875
- func api_VMError_Type_Get(handle CGoHandle) *C.char {
2876
- op := ptrFromHandle_api_VMError(handle)
2877
- return C.CString(string(op.Type))
2878
- }
2879
-
2880
- //export api_VMError_Type_Set
2881
- func api_VMError_Type_Set(handle CGoHandle, val *C.char) {
2882
- op := ptrFromHandle_api_VMError(handle)
2883
- op.Type = api.ErrorType(C.GoString(val))
2884
- }
2885
-
2886
- //export api_VMError_Message_Get
2887
- func api_VMError_Message_Get(handle CGoHandle) *C.char {
2888
- op := ptrFromHandle_api_VMError(handle)
2889
- return C.CString(op.Message)
2890
- }
2891
-
2892
- //export api_VMError_Message_Set
2893
- func api_VMError_Message_Set(handle CGoHandle, val *C.char) {
2894
- op := ptrFromHandle_api_VMError(handle)
2895
- op.Message = C.GoString(val)
2896
- }
2897
-
2898
- //export api_VMError_Source_Get
2899
- func api_VMError_Source_Get(handle CGoHandle) CGoHandle {
2900
- op := ptrFromHandle_api_VMError(handle)
2901
- return handleFromPtr_Ptr_api_SourceLocation(op.Source)
2902
- }
2903
-
2904
- //export api_VMError_Source_Set
2905
- func api_VMError_Source_Set(handle CGoHandle, val CGoHandle) {
2906
- op := ptrFromHandle_api_VMError(handle)
2907
- op.Source = ptrFromHandle_Ptr_api_SourceLocation(val)
2908
- }
2909
-
2910
- //export api_VMError_Duration_Get
2911
- func api_VMError_Duration_Get(handle CGoHandle) C.longlong {
2912
- op := ptrFromHandle_api_VMError(handle)
2913
- return C.longlong(int64(op.Duration))
2914
- }
2915
-
2916
- //export api_VMError_Duration_Set
2917
- func api_VMError_Duration_Set(handle CGoHandle, val C.longlong) {
2918
- op := ptrFromHandle_api_VMError(handle)
2919
- op.Duration = time.Duration(int64(val))
2940
+ //export api_VMConfig_CTor
2941
+ func api_VMConfig_CTor() CGoHandle {
2942
+ return CGoHandle(handleFromPtr_api_VMConfig(&api.VMConfig{}))
2920
2943
  }
2921
2944
 
2922
- //export api_VMError_Error
2923
- func api_VMError_Error(_handle CGoHandle) *C.char {
2924
- _saved_thread := C.PyEval_SaveThread()
2925
- defer C.PyEval_RestoreThread(_saved_thread)
2926
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2927
- if __err != nil {
2928
- return C.CString("")
2929
- }
2930
- return C.CString(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).Error())
2931
-
2945
+ //export api_VMConfig_Stdout_Get
2946
+ func api_VMConfig_Stdout_Get(handle CGoHandle) CGoHandle {
2947
+ op := ptrFromHandle_api_VMConfig(handle)
2948
+ return handleFromPtr_io_Writer(op.Stdout)
2932
2949
  }
2933
2950
 
2934
- //export api_VMError_Unwrap
2935
- func api_VMError_Unwrap(_handle CGoHandle) *C.char {
2936
- _saved_thread := C.PyEval_SaveThread()
2937
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2938
- if __err != nil {
2939
- return errorGoToPy(nil)
2940
- }
2941
- __err = gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).Unwrap()
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
- return estr
2948
- }
2949
- return C.CString("")
2951
+ //export api_VMConfig_Stdout_Set
2952
+ func api_VMConfig_Stdout_Set(handle CGoHandle, val CGoHandle) {
2953
+ op := ptrFromHandle_api_VMConfig(handle)
2954
+ op.Stdout = ptrFromHandle_io_Writer(val)
2950
2955
  }
2951
2956
 
2952
- //export api_VMError_IsCompileError
2953
- func api_VMError_IsCompileError(_handle CGoHandle) C.char {
2954
- _saved_thread := C.PyEval_SaveThread()
2955
- defer C.PyEval_RestoreThread(_saved_thread)
2956
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2957
- if __err != nil {
2958
- return boolGoToPy(false)
2959
- }
2960
- return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsCompileError())
2957
+ //export api_VMConfig_Stdin_Get
2958
+ func api_VMConfig_Stdin_Get(handle CGoHandle) CGoHandle {
2959
+ op := ptrFromHandle_api_VMConfig(handle)
2960
+ return handleFromPtr_io_Reader(op.Stdin)
2961
+ }
2961
2962
 
2963
+ //export api_VMConfig_Stdin_Set
2964
+ func api_VMConfig_Stdin_Set(handle CGoHandle, val CGoHandle) {
2965
+ op := ptrFromHandle_api_VMConfig(handle)
2966
+ op.Stdin = ptrFromHandle_io_Reader(val)
2962
2967
  }
2963
2968
 
2964
- //export api_VMError_IsRuntimeError
2965
- func api_VMError_IsRuntimeError(_handle CGoHandle) C.char {
2966
- _saved_thread := C.PyEval_SaveThread()
2967
- defer C.PyEval_RestoreThread(_saved_thread)
2968
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2969
- if __err != nil {
2970
- return boolGoToPy(false)
2971
- }
2972
- return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsRuntimeError())
2969
+ //export api_VMConfig_Timeout_Get
2970
+ func api_VMConfig_Timeout_Get(handle CGoHandle) C.longlong {
2971
+ op := ptrFromHandle_api_VMConfig(handle)
2972
+ return C.longlong(int64(op.Timeout))
2973
+ }
2973
2974
 
2975
+ //export api_VMConfig_Timeout_Set
2976
+ func api_VMConfig_Timeout_Set(handle CGoHandle, val C.longlong) {
2977
+ op := ptrFromHandle_api_VMConfig(handle)
2978
+ op.Timeout = time.Duration(int64(val))
2974
2979
  }
2975
2980
 
2976
- //export api_VMError_IsTimeoutError
2977
- func api_VMError_IsTimeoutError(_handle CGoHandle) C.char {
2978
- _saved_thread := C.PyEval_SaveThread()
2979
- defer C.PyEval_RestoreThread(_saved_thread)
2980
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2981
- if __err != nil {
2982
- return boolGoToPy(false)
2983
- }
2984
- return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsTimeoutError())
2981
+ //export api_VMConfig_WorkingDirectory_Get
2982
+ func api_VMConfig_WorkingDirectory_Get(handle CGoHandle) *C.char {
2983
+ op := ptrFromHandle_api_VMConfig(handle)
2984
+ return C.CString(op.WorkingDirectory)
2985
+ }
2985
2986
 
2987
+ //export api_VMConfig_WorkingDirectory_Set
2988
+ func api_VMConfig_WorkingDirectory_Set(handle CGoHandle, val *C.char) {
2989
+ op := ptrFromHandle_api_VMConfig(handle)
2990
+ op.WorkingDirectory = C.GoString(val)
2986
2991
  }
2987
2992
 
2988
- //export api_VMError_IsConversionError
2989
- func api_VMError_IsConversionError(_handle CGoHandle) C.char {
2993
+ //export api_VMConfig_Validate
2994
+ func api_VMConfig_Validate(_handle CGoHandle) *C.char {
2990
2995
  _saved_thread := C.PyEval_SaveThread()
2991
- defer C.PyEval_RestoreThread(_saved_thread)
2992
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
2996
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMConfig")
2993
2997
  if __err != nil {
2994
- return boolGoToPy(false)
2998
+ return errorGoToPy(nil)
2995
2999
  }
2996
- return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsConversionError())
2997
-
2998
- }
3000
+ __err = gopyh.Embed(vifc, reflect.TypeOf(api.VMConfig{})).(*api.VMConfig).Validate()
2999
3001
 
3000
- //export api_VMError_IsConfigError
3001
- func api_VMError_IsConfigError(_handle CGoHandle) C.char {
3002
- _saved_thread := C.PyEval_SaveThread()
3003
- defer C.PyEval_RestoreThread(_saved_thread)
3004
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMError")
3002
+ C.PyEval_RestoreThread(_saved_thread)
3005
3003
  if __err != nil {
3006
- return boolGoToPy(false)
3004
+ estr := C.CString(__err.Error())
3005
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3006
+ return estr
3007
3007
  }
3008
- return boolGoToPy(gopyh.Embed(vifc, reflect.TypeOf(api.VMError{})).(*api.VMError).IsConfigError())
3009
-
3008
+ return C.CString("")
3010
3009
  }
3011
3010
 
3012
3011
  // --- wrapping struct: api.ClassDefinition ---
@@ -3100,336 +3099,372 @@ func api_ClassDefinition_UnknownFunctionHandler_Set(handle CGoHandle, val CGoHan
3100
3099
  op.UnknownFunctionHandler = ptrFromHandle_Ptr_api_UnknownFunctionHandler(val)
3101
3100
  }
3102
3101
 
3103
- // --- wrapping struct: api.ClassMethod ---
3102
+ // --- wrapping struct: api.ClassVariable ---
3104
3103
  //
3105
- //export api_ClassMethod_CTor
3106
- func api_ClassMethod_CTor() CGoHandle {
3107
- return CGoHandle(handleFromPtr_api_ClassMethod(&api.ClassMethod{}))
3104
+ //export api_ClassVariable_CTor
3105
+ func api_ClassVariable_CTor() CGoHandle {
3106
+ return CGoHandle(handleFromPtr_api_ClassVariable(&api.ClassVariable{}))
3108
3107
  }
3109
3108
 
3110
- //export api_ClassMethod_Name_Get
3111
- func api_ClassMethod_Name_Get(handle CGoHandle) *C.char {
3112
- op := ptrFromHandle_api_ClassMethod(handle)
3109
+ //export api_ClassVariable_Name_Get
3110
+ func api_ClassVariable_Name_Get(handle CGoHandle) *C.char {
3111
+ op := ptrFromHandle_api_ClassVariable(handle)
3113
3112
  return C.CString(op.Name)
3114
3113
  }
3115
3114
 
3116
- //export api_ClassMethod_Name_Set
3117
- func api_ClassMethod_Name_Set(handle CGoHandle, val *C.char) {
3118
- op := ptrFromHandle_api_ClassMethod(handle)
3115
+ //export api_ClassVariable_Name_Set
3116
+ func api_ClassVariable_Name_Set(handle CGoHandle, val *C.char) {
3117
+ op := ptrFromHandle_api_ClassVariable(handle)
3119
3118
  op.Name = C.GoString(val)
3120
3119
  }
3121
3120
 
3122
- //export api_ClassMethod_Argc_Get
3123
- func api_ClassMethod_Argc_Get(handle CGoHandle) C.longlong {
3124
- op := ptrFromHandle_api_ClassMethod(handle)
3125
- return C.longlong(op.Argc)
3121
+ //export api_ClassVariable_Value_Get
3122
+ func api_ClassVariable_Value_Get(handle CGoHandle) CGoHandle {
3123
+ op := ptrFromHandle_api_ClassVariable(handle)
3124
+ return handleFromPtr_api_GoValue(&op.Value)
3126
3125
  }
3127
3126
 
3128
- //export api_ClassMethod_Argc_Set
3129
- func api_ClassMethod_Argc_Set(handle CGoHandle, val C.longlong) {
3130
- op := ptrFromHandle_api_ClassMethod(handle)
3131
- op.Argc = int(val)
3127
+ //export api_ClassVariable_Value_Set
3128
+ func api_ClassVariable_Value_Set(handle CGoHandle, val CGoHandle) {
3129
+ op := ptrFromHandle_api_ClassVariable(handle)
3130
+ op.Value = *ptrFromHandle_api_GoValue(val)
3132
3131
  }
3133
3132
 
3134
- // --- wrapping struct: api.VM ---
3133
+ //export api_ClassVariable_Locked_Get
3134
+ func api_ClassVariable_Locked_Get(handle CGoHandle) C.char {
3135
+ op := ptrFromHandle_api_ClassVariable(handle)
3136
+ return boolGoToPy(op.Locked)
3137
+ }
3138
+
3139
+ //export api_ClassVariable_Locked_Set
3140
+ func api_ClassVariable_Locked_Set(handle CGoHandle, val C.char) {
3141
+ op := ptrFromHandle_api_ClassVariable(handle)
3142
+ op.Locked = boolPyToGo(val)
3143
+ }
3144
+
3145
+ // --- wrapping struct: api.ExecutionResult ---
3135
3146
  //
3136
- //export api_VM_CTor
3137
- func api_VM_CTor() CGoHandle {
3138
- return CGoHandle(handleFromPtr_api_VM(&api.VM{}))
3147
+ //export api_ExecutionResult_CTor
3148
+ func api_ExecutionResult_CTor() CGoHandle {
3149
+ return CGoHandle(handleFromPtr_api_ExecutionResult(&api.ExecutionResult{}))
3139
3150
  }
3140
3151
 
3141
- //export api_VM_GetCompatibilityShim
3142
- func api_VM_GetCompatibilityShim(_handle CGoHandle) CGoHandle {
3152
+ //export api_ExecutionResult_Value_Get
3153
+ func api_ExecutionResult_Value_Get(handle CGoHandle) CGoHandle {
3154
+ op := ptrFromHandle_api_ExecutionResult(handle)
3155
+ return handleFromPtr_api_GoValue(&op.Value)
3156
+ }
3157
+
3158
+ //export api_ExecutionResult_Value_Set
3159
+ func api_ExecutionResult_Value_Set(handle CGoHandle, val CGoHandle) {
3160
+ op := ptrFromHandle_api_ExecutionResult(handle)
3161
+ op.Value = *ptrFromHandle_api_GoValue(val)
3162
+ }
3163
+
3164
+ //export api_ExecutionResult_RawValue_Get
3165
+ func api_ExecutionResult_RawValue_Get(handle CGoHandle) CGoHandle {
3166
+ op := ptrFromHandle_api_ExecutionResult(handle)
3167
+ return handleFromPtr_environment_Value(op.RawValue)
3168
+ }
3169
+
3170
+ //export api_ExecutionResult_RawValue_Set
3171
+ func api_ExecutionResult_RawValue_Set(handle CGoHandle, val CGoHandle) {
3172
+ op := ptrFromHandle_api_ExecutionResult(handle)
3173
+ op.RawValue = ptrFromHandle_environment_Value(val)
3174
+ }
3175
+
3176
+ //export api_ExecutionResult_Output_Get
3177
+ func api_ExecutionResult_Output_Get(handle CGoHandle) *C.char {
3178
+ op := ptrFromHandle_api_ExecutionResult(handle)
3179
+ return C.CString(op.Output)
3180
+ }
3181
+
3182
+ //export api_ExecutionResult_Output_Set
3183
+ func api_ExecutionResult_Output_Set(handle CGoHandle, val *C.char) {
3184
+ op := ptrFromHandle_api_ExecutionResult(handle)
3185
+ op.Output = C.GoString(val)
3186
+ }
3187
+
3188
+ // --- wrapping struct: api.GoValue ---
3189
+ //
3190
+ //export api_GoValue_CTor
3191
+ func api_GoValue_CTor() CGoHandle {
3192
+ return CGoHandle(handleFromPtr_api_GoValue(&api.GoValue{}))
3193
+ }
3194
+
3195
+ //export api_GoValue_ID
3196
+ func api_GoValue_ID(_handle CGoHandle) *C.char {
3143
3197
  _saved_thread := C.PyEval_SaveThread()
3144
3198
  defer C.PyEval_RestoreThread(_saved_thread)
3145
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
3199
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
3146
3200
  if __err != nil {
3147
- return handleFromPtr_Ptr_api_VMCompatibilityShim(nil)
3201
+ return C.CString("")
3148
3202
  }
3149
- return handleFromPtr_Ptr_api_VMCompatibilityShim(gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).GetCompatibilityShim())
3203
+ return C.CString(gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).ID())
3150
3204
 
3151
3205
  }
3152
3206
 
3153
- //export api_VM_Execute
3154
- func api_VM_Execute(_handle CGoHandle, code *C.char) CGoHandle {
3207
+ //export api_GoValue_MarshalJSON
3208
+ func api_GoValue_MarshalJSON(_handle CGoHandle) CGoHandle {
3155
3209
  _saved_thread := C.PyEval_SaveThread()
3156
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
3210
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
3157
3211
  if __err != nil {
3158
- return handleFromPtr_Ptr_api_ExecutionResult(nil)
3212
+ return handleFromPtr_Slice_byte(nil)
3159
3213
  }
3160
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).Execute(C.GoString(code))
3214
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).MarshalJSON()
3161
3215
 
3162
3216
  C.PyEval_RestoreThread(_saved_thread)
3163
3217
  if __err != nil {
3164
3218
  estr := C.CString(__err.Error())
3165
3219
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3166
3220
  C.free(unsafe.Pointer(estr))
3167
- return handleFromPtr_Ptr_api_ExecutionResult(nil)
3221
+ return handleFromPtr_Slice_byte(nil)
3168
3222
  }
3169
- return handleFromPtr_Ptr_api_ExecutionResult(cret)
3223
+ return handleFromPtr_Slice_byte(&cret)
3170
3224
  }
3171
3225
 
3172
- //export api_VM_ExecuteWithContext
3173
- func api_VM_ExecuteWithContext(_handle CGoHandle, ctx CGoHandle, code *C.char) CGoHandle {
3226
+ //export api_GoValue_Type
3227
+ func api_GoValue_Type(_handle CGoHandle) *C.char {
3174
3228
  _saved_thread := C.PyEval_SaveThread()
3175
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
3229
+ defer C.PyEval_RestoreThread(_saved_thread)
3230
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
3176
3231
  if __err != nil {
3177
- return handleFromPtr_Ptr_api_ExecutionResult(nil)
3232
+ return C.CString("")
3178
3233
  }
3179
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).ExecuteWithContext(ptrFromHandle_context_Context(ctx), C.GoString(code))
3234
+ return C.CString(gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Type())
3180
3235
 
3181
- C.PyEval_RestoreThread(_saved_thread)
3182
- if __err != nil {
3183
- estr := C.CString(__err.Error())
3184
- C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3185
- C.free(unsafe.Pointer(estr))
3186
- return handleFromPtr_Ptr_api_ExecutionResult(nil)
3187
- }
3188
- return handleFromPtr_Ptr_api_ExecutionResult(cret)
3189
3236
  }
3190
3237
 
3191
- //export api_VM_NewObjectInstance
3192
- func api_VM_NewObjectInstance(_handle CGoHandle, className *C.char) CGoHandle {
3238
+ //export api_GoValue_Int
3239
+ func api_GoValue_Int(_handle CGoHandle) C.longlong {
3193
3240
  _saved_thread := C.PyEval_SaveThread()
3194
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
3241
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
3195
3242
  if __err != nil {
3196
- return handleFromPtr_api_GoValue(nil)
3243
+ return C.longlong(0)
3197
3244
  }
3198
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).NewObjectInstance(C.GoString(className))
3245
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Int()
3199
3246
 
3200
3247
  C.PyEval_RestoreThread(_saved_thread)
3201
3248
  if __err != nil {
3202
3249
  estr := C.CString(__err.Error())
3203
3250
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3204
3251
  C.free(unsafe.Pointer(estr))
3205
- return handleFromPtr_api_GoValue(nil)
3252
+ return C.longlong(0)
3206
3253
  }
3207
- return handleFromPtr_api_GoValue(&cret)
3254
+ return C.longlong(cret)
3208
3255
  }
3209
3256
 
3210
- //export api_VM_Call
3211
- func api_VM_Call(_handle CGoHandle, functionName *C.char, args CGoHandle) CGoHandle {
3257
+ //export api_GoValue_Float
3258
+ func api_GoValue_Float(_handle CGoHandle) C.double {
3212
3259
  _saved_thread := C.PyEval_SaveThread()
3213
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
3260
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
3214
3261
  if __err != nil {
3215
- return handleFromPtr_api_GoValue(nil)
3262
+ return C.double(0)
3216
3263
  }
3217
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).Call(C.GoString(functionName), deptrFromHandle_Slice_api_GoValue(args))
3264
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Float()
3218
3265
 
3219
3266
  C.PyEval_RestoreThread(_saved_thread)
3220
3267
  if __err != nil {
3221
3268
  estr := C.CString(__err.Error())
3222
3269
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3223
3270
  C.free(unsafe.Pointer(estr))
3224
- return handleFromPtr_api_GoValue(nil)
3271
+ return C.double(0)
3225
3272
  }
3226
- return handleFromPtr_api_GoValue(&cret)
3273
+ return C.double(cret)
3227
3274
  }
3228
3275
 
3229
- //export api_VM_CallMethod
3230
- func api_VM_CallMethod(_handle CGoHandle, object CGoHandle, methodName *C.char, args CGoHandle) CGoHandle {
3276
+ //export api_GoValue_String
3277
+ func api_GoValue_String(_handle CGoHandle) *C.char {
3231
3278
  _saved_thread := C.PyEval_SaveThread()
3232
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
3279
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
3233
3280
  if __err != nil {
3234
- return handleFromPtr_api_GoValue(nil)
3281
+ return C.CString("")
3235
3282
  }
3236
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).CallMethod(*ptrFromHandle_api_GoValue(object), C.GoString(methodName), deptrFromHandle_Slice_api_GoValue(args))
3283
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).String()
3237
3284
 
3238
3285
  C.PyEval_RestoreThread(_saved_thread)
3239
3286
  if __err != nil {
3240
3287
  estr := C.CString(__err.Error())
3241
3288
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3242
3289
  C.free(unsafe.Pointer(estr))
3243
- return handleFromPtr_api_GoValue(nil)
3290
+ return C.CString("")
3244
3291
  }
3245
- return handleFromPtr_api_GoValue(&cret)
3292
+ return C.CString(cret)
3246
3293
  }
3247
-
3248
- //export api_VM_DefineVariable
3249
- func api_VM_DefineVariable(_handle CGoHandle, name *C.char, value CGoHandle, constant C.char) *C.char {
3294
+
3295
+ //export api_GoValue_Bool
3296
+ func api_GoValue_Bool(_handle CGoHandle) C.char {
3250
3297
  _saved_thread := C.PyEval_SaveThread()
3251
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
3298
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
3252
3299
  if __err != nil {
3253
- return errorGoToPy(nil)
3300
+ return boolGoToPy(false)
3254
3301
  }
3255
- __err = gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).DefineVariable(C.GoString(name), *ptrFromHandle_api_GoValue(value), boolPyToGo(constant))
3302
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Bool()
3256
3303
 
3257
3304
  C.PyEval_RestoreThread(_saved_thread)
3258
3305
  if __err != nil {
3259
3306
  estr := C.CString(__err.Error())
3260
3307
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3261
- return estr
3308
+ C.free(unsafe.Pointer(estr))
3309
+ return boolGoToPy(false)
3262
3310
  }
3263
- return C.CString("")
3311
+ return boolGoToPy(cret)
3264
3312
  }
3265
3313
 
3266
- //export api_VM_SetVariable
3267
- func api_VM_SetVariable(_handle CGoHandle, variableName *C.char, value CGoHandle) *C.char {
3314
+ //export api_GoValue_Slice
3315
+ func api_GoValue_Slice(_handle CGoHandle) CGoHandle {
3268
3316
  _saved_thread := C.PyEval_SaveThread()
3269
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
3317
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
3270
3318
  if __err != nil {
3271
- return errorGoToPy(nil)
3319
+ return handleFromPtr_Slice_api_GoValue(nil)
3272
3320
  }
3273
- __err = gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).SetVariable(C.GoString(variableName), *ptrFromHandle_api_GoValue(value))
3321
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Slice()
3274
3322
 
3275
3323
  C.PyEval_RestoreThread(_saved_thread)
3276
3324
  if __err != nil {
3277
3325
  estr := C.CString(__err.Error())
3278
3326
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3279
- return estr
3327
+ C.free(unsafe.Pointer(estr))
3328
+ return handleFromPtr_Slice_api_GoValue(nil)
3280
3329
  }
3281
- return C.CString("")
3330
+ return handleFromPtr_Slice_api_GoValue(&cret)
3282
3331
  }
3283
3332
 
3284
- //export api_VM_GetVariable
3285
- func api_VM_GetVariable(_handle CGoHandle, variableName *C.char) CGoHandle {
3333
+ //export api_GoValue_Map
3334
+ func api_GoValue_Map(_handle CGoHandle) CGoHandle {
3286
3335
  _saved_thread := C.PyEval_SaveThread()
3287
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
3336
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
3288
3337
  if __err != nil {
3289
- return handleFromPtr_api_GoValue(nil)
3338
+ return handleFromPtr_Map_string_api_GoValue(nil)
3290
3339
  }
3291
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).GetVariable(C.GoString(variableName))
3340
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Map()
3292
3341
 
3293
3342
  C.PyEval_RestoreThread(_saved_thread)
3294
3343
  if __err != nil {
3295
3344
  estr := C.CString(__err.Error())
3296
3345
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3297
3346
  C.free(unsafe.Pointer(estr))
3298
- return handleFromPtr_api_GoValue(nil)
3347
+ return handleFromPtr_Map_string_api_GoValue(nil)
3299
3348
  }
3300
- return handleFromPtr_api_GoValue(&cret)
3349
+ return handleFromPtr_Map_string_api_GoValue(&cret)
3301
3350
  }
3302
3351
 
3303
- //export api_VM_DefineClass
3304
- func api_VM_DefineClass(_handle CGoHandle, classDef CGoHandle) *C.char {
3352
+ //export api_GoValue_Object
3353
+ func api_GoValue_Object(_handle CGoHandle) CGoHandle {
3305
3354
  _saved_thread := C.PyEval_SaveThread()
3306
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
3355
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
3307
3356
  if __err != nil {
3308
- return errorGoToPy(nil)
3357
+ return handleFromPtr_Ptr_environment_ObjectInstance(nil)
3309
3358
  }
3310
- __err = gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).DefineClass(ptrFromHandle_Ptr_api_ClassDefinition(classDef))
3359
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Object()
3311
3360
 
3312
3361
  C.PyEval_RestoreThread(_saved_thread)
3313
3362
  if __err != nil {
3314
3363
  estr := C.CString(__err.Error())
3315
3364
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3316
- return estr
3365
+ C.free(unsafe.Pointer(estr))
3366
+ return handleFromPtr_Ptr_environment_ObjectInstance(nil)
3317
3367
  }
3318
- return C.CString("")
3368
+ return handleFromPtr_Ptr_environment_ObjectInstance(cret)
3319
3369
  }
3320
3370
 
3321
- // --- wrapping struct: api.ExecutionResult ---
3322
- //
3323
- //export api_ExecutionResult_CTor
3324
- func api_ExecutionResult_CTor() CGoHandle {
3325
- return CGoHandle(handleFromPtr_api_ExecutionResult(&api.ExecutionResult{}))
3326
- }
3371
+ // ---- Slices ---
3327
3372
 
3328
- //export api_ExecutionResult_Value_Get
3329
- func api_ExecutionResult_Value_Get(handle CGoHandle) CGoHandle {
3330
- op := ptrFromHandle_api_ExecutionResult(handle)
3331
- return handleFromPtr_api_GoValue(&op.Value)
3332
- }
3373
+ // ---- Maps ---
3333
3374
 
3334
- //export api_ExecutionResult_Value_Set
3335
- func api_ExecutionResult_Value_Set(handle CGoHandle, val CGoHandle) {
3336
- op := ptrFromHandle_api_ExecutionResult(handle)
3337
- op.Value = *ptrFromHandle_api_GoValue(val)
3338
- }
3375
+ // ---- Constructors ---
3339
3376
 
3340
- //export api_ExecutionResult_RawValue_Get
3341
- func api_ExecutionResult_RawValue_Get(handle CGoHandle) CGoHandle {
3342
- op := ptrFromHandle_api_ExecutionResult(handle)
3343
- return handleFromPtr_environment_Value(op.RawValue)
3344
- }
3377
+ //export api_NewConfigError
3378
+ func api_NewConfigError(message *C.char, wrapped *C.char) CGoHandle {
3379
+ _saved_thread := C.PyEval_SaveThread()
3380
+ defer C.PyEval_RestoreThread(_saved_thread)
3381
+ return handleFromPtr_Ptr_api_VMError(api.NewConfigError(C.GoString(message), errors.New(C.GoString(wrapped))))
3345
3382
 
3346
- //export api_ExecutionResult_RawValue_Set
3347
- func api_ExecutionResult_RawValue_Set(handle CGoHandle, val CGoHandle) {
3348
- op := ptrFromHandle_api_ExecutionResult(handle)
3349
- op.RawValue = ptrFromHandle_environment_Value(val)
3350
3383
  }
3351
3384
 
3352
- //export api_ExecutionResult_Output_Get
3353
- func api_ExecutionResult_Output_Get(handle CGoHandle) *C.char {
3354
- op := ptrFromHandle_api_ExecutionResult(handle)
3355
- return C.CString(op.Output)
3356
- }
3385
+ //export api_NewTimeoutError
3386
+ func api_NewTimeoutError(duration C.longlong) CGoHandle {
3387
+ _saved_thread := C.PyEval_SaveThread()
3388
+ defer C.PyEval_RestoreThread(_saved_thread)
3389
+ return handleFromPtr_Ptr_api_VMError(api.NewTimeoutError(time.Duration(int64(duration))))
3357
3390
 
3358
- //export api_ExecutionResult_Output_Set
3359
- func api_ExecutionResult_Output_Set(handle CGoHandle, val *C.char) {
3360
- op := ptrFromHandle_api_ExecutionResult(handle)
3361
- op.Output = C.GoString(val)
3362
3391
  }
3363
3392
 
3364
- // --- wrapping struct: api.UnknownFunctionHandler ---
3365
- //
3366
- //export api_UnknownFunctionHandler_CTor
3367
- func api_UnknownFunctionHandler_CTor() CGoHandle {
3368
- return CGoHandle(handleFromPtr_api_UnknownFunctionHandler(&api.UnknownFunctionHandler{}))
3369
- }
3393
+ //export api_NewConversionError
3394
+ func api_NewConversionError(message *C.char, wrapped *C.char) CGoHandle {
3395
+ _saved_thread := C.PyEval_SaveThread()
3396
+ defer C.PyEval_RestoreThread(_saved_thread)
3397
+ return handleFromPtr_Ptr_api_VMError(api.NewConversionError(C.GoString(message), errors.New(C.GoString(wrapped))))
3370
3398
 
3371
- // ---- Slices ---
3399
+ }
3372
3400
 
3373
- // ---- Maps ---
3401
+ //export api_NewCompileError
3402
+ func api_NewCompileError(message *C.char, source CGoHandle) CGoHandle {
3403
+ _saved_thread := C.PyEval_SaveThread()
3404
+ defer C.PyEval_RestoreThread(_saved_thread)
3405
+ return handleFromPtr_Ptr_api_VMError(api.NewCompileError(C.GoString(message), ptrFromHandle_Ptr_api_SourceLocation(source)))
3374
3406
 
3375
- // ---- Constructors ---
3407
+ }
3376
3408
 
3377
- //export api_WrapString
3378
- func api_WrapString(value *C.char) CGoHandle {
3409
+ //export api_NewRuntimeError
3410
+ func api_NewRuntimeError(message *C.char, source CGoHandle) CGoHandle {
3379
3411
  _saved_thread := C.PyEval_SaveThread()
3380
3412
  defer C.PyEval_RestoreThread(_saved_thread)
3381
- cret := api.WrapString(C.GoString(value))
3413
+ return handleFromPtr_Ptr_api_VMError(api.NewRuntimeError(C.GoString(message), ptrFromHandle_Ptr_api_SourceLocation(source)))
3382
3414
 
3383
- return handleFromPtr_api_GoValue(&cret)
3384
3415
  }
3385
3416
 
3386
- //export api_ToGoValue
3387
- func api_ToGoValue(val CGoHandle) CGoHandle {
3417
+ //export api_NewVM
3418
+ func api_NewVM(config CGoHandle) CGoHandle {
3388
3419
  _saved_thread := C.PyEval_SaveThread()
3389
- cret, __err := api.ToGoValue(ptrFromHandle_environment_Value(val))
3420
+ cret, __err := api.NewVM(ptrFromHandle_Ptr_api_VMConfig(config))
3390
3421
 
3391
3422
  C.PyEval_RestoreThread(_saved_thread)
3392
3423
  if __err != nil {
3393
3424
  estr := C.CString(__err.Error())
3394
3425
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3395
3426
  C.free(unsafe.Pointer(estr))
3396
- return handleFromPtr_api_GoValue(nil)
3427
+ return handleFromPtr_Ptr_api_VM(nil)
3397
3428
  }
3398
- return handleFromPtr_api_GoValue(&cret)
3429
+ return handleFromPtr_Ptr_api_VM(cret)
3399
3430
  }
3400
3431
 
3401
- //export api_WrapAny
3402
- func api_WrapAny(value *C.char) CGoHandle {
3432
+ //export api_DefaultConfig
3433
+ func api_DefaultConfig() CGoHandle {
3403
3434
  _saved_thread := C.PyEval_SaveThread()
3404
3435
  defer C.PyEval_RestoreThread(_saved_thread)
3405
- cret := api.WrapAny(C.GoString(value))
3436
+ return handleFromPtr_Ptr_api_VMConfig(api.DefaultConfig())
3406
3437
 
3407
- return handleFromPtr_api_GoValue(&cret)
3408
3438
  }
3409
3439
 
3410
- //export api_WrapObject
3411
- func api_WrapObject(value CGoHandle) CGoHandle {
3440
+ //export api_NewClassDefinition
3441
+ func api_NewClassDefinition() CGoHandle {
3412
3442
  _saved_thread := C.PyEval_SaveThread()
3413
3443
  defer C.PyEval_RestoreThread(_saved_thread)
3414
- cret := api.WrapObject(ptrFromHandle_Ptr_environment_ObjectInstance(value))
3444
+ return handleFromPtr_Ptr_api_ClassDefinition(api.NewClassDefinition())
3415
3445
 
3416
- return handleFromPtr_api_GoValue(&cret)
3417
3446
  }
3418
3447
 
3419
- //export api_WrapBool
3420
- func api_WrapBool(value C.char) CGoHandle {
3448
+ //export api_ToGoValue
3449
+ func api_ToGoValue(val CGoHandle) CGoHandle {
3421
3450
  _saved_thread := C.PyEval_SaveThread()
3422
- defer C.PyEval_RestoreThread(_saved_thread)
3423
- cret := api.WrapBool(boolPyToGo(value))
3451
+ cret, __err := api.ToGoValue(ptrFromHandle_environment_Value(val))
3424
3452
 
3453
+ C.PyEval_RestoreThread(_saved_thread)
3454
+ if __err != nil {
3455
+ estr := C.CString(__err.Error())
3456
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3457
+ C.free(unsafe.Pointer(estr))
3458
+ return handleFromPtr_api_GoValue(nil)
3459
+ }
3425
3460
  return handleFromPtr_api_GoValue(&cret)
3426
3461
  }
3427
3462
 
3428
- //export api_WrapFloat
3429
- func api_WrapFloat(value C.double) CGoHandle {
3463
+ //export api_WrapBool
3464
+ func api_WrapBool(value C.char) CGoHandle {
3430
3465
  _saved_thread := C.PyEval_SaveThread()
3431
3466
  defer C.PyEval_RestoreThread(_saved_thread)
3432
- cret := api.WrapFloat(float64(value))
3467
+ cret := api.WrapBool(boolPyToGo(value))
3433
3468
 
3434
3469
  return handleFromPtr_api_GoValue(&cret)
3435
3470
  }
@@ -3443,79 +3478,59 @@ func api_WrapInt(value C.longlong) CGoHandle {
3443
3478
  return handleFromPtr_api_GoValue(&cret)
3444
3479
  }
3445
3480
 
3446
- //export api_DefaultConfig
3447
- func api_DefaultConfig() CGoHandle {
3448
- _saved_thread := C.PyEval_SaveThread()
3449
- defer C.PyEval_RestoreThread(_saved_thread)
3450
- return handleFromPtr_Ptr_api_VMConfig(api.DefaultConfig())
3451
-
3452
- }
3453
-
3454
- //export api_NewConversionError
3455
- func api_NewConversionError(message *C.char, wrapped *C.char) CGoHandle {
3456
- _saved_thread := C.PyEval_SaveThread()
3457
- defer C.PyEval_RestoreThread(_saved_thread)
3458
- return handleFromPtr_Ptr_api_VMError(api.NewConversionError(C.GoString(message), errors.New(C.GoString(wrapped))))
3459
-
3460
- }
3461
-
3462
- //export api_NewCompileError
3463
- func api_NewCompileError(message *C.char, source CGoHandle) CGoHandle {
3481
+ //export api_WrapAny
3482
+ func api_WrapAny(value *C.char) CGoHandle {
3464
3483
  _saved_thread := C.PyEval_SaveThread()
3465
3484
  defer C.PyEval_RestoreThread(_saved_thread)
3466
- return handleFromPtr_Ptr_api_VMError(api.NewCompileError(C.GoString(message), ptrFromHandle_Ptr_api_SourceLocation(source)))
3485
+ cret := api.WrapAny(C.GoString(value))
3467
3486
 
3487
+ return handleFromPtr_api_GoValue(&cret)
3468
3488
  }
3469
3489
 
3470
- //export api_NewConfigError
3471
- func api_NewConfigError(message *C.char, wrapped *C.char) CGoHandle {
3490
+ //export api_WrapObject
3491
+ func api_WrapObject(value CGoHandle) CGoHandle {
3472
3492
  _saved_thread := C.PyEval_SaveThread()
3473
3493
  defer C.PyEval_RestoreThread(_saved_thread)
3474
- return handleFromPtr_Ptr_api_VMError(api.NewConfigError(C.GoString(message), errors.New(C.GoString(wrapped))))
3494
+ cret := api.WrapObject(ptrFromHandle_Ptr_environment_ObjectInstance(value))
3475
3495
 
3496
+ return handleFromPtr_api_GoValue(&cret)
3476
3497
  }
3477
3498
 
3478
- //export api_NewRuntimeError
3479
- func api_NewRuntimeError(message *C.char, source CGoHandle) CGoHandle {
3499
+ //export api_WrapFloat
3500
+ func api_WrapFloat(value C.double) CGoHandle {
3480
3501
  _saved_thread := C.PyEval_SaveThread()
3481
3502
  defer C.PyEval_RestoreThread(_saved_thread)
3482
- return handleFromPtr_Ptr_api_VMError(api.NewRuntimeError(C.GoString(message), ptrFromHandle_Ptr_api_SourceLocation(source)))
3503
+ cret := api.WrapFloat(float64(value))
3483
3504
 
3505
+ return handleFromPtr_api_GoValue(&cret)
3484
3506
  }
3485
3507
 
3486
- //export api_NewTimeoutError
3487
- func api_NewTimeoutError(duration C.longlong) CGoHandle {
3508
+ //export api_WrapString
3509
+ func api_WrapString(value *C.char) CGoHandle {
3488
3510
  _saved_thread := C.PyEval_SaveThread()
3489
3511
  defer C.PyEval_RestoreThread(_saved_thread)
3490
- return handleFromPtr_Ptr_api_VMError(api.NewTimeoutError(time.Duration(int64(duration))))
3512
+ cret := api.WrapString(C.GoString(value))
3491
3513
 
3514
+ return handleFromPtr_api_GoValue(&cret)
3492
3515
  }
3493
3516
 
3494
- //export api_NewClassDefinition
3495
- func api_NewClassDefinition() CGoHandle {
3496
- _saved_thread := C.PyEval_SaveThread()
3497
- defer C.PyEval_RestoreThread(_saved_thread)
3498
- return handleFromPtr_Ptr_api_ClassDefinition(api.NewClassDefinition())
3499
-
3500
- }
3517
+ // ---- Functions ---
3501
3518
 
3502
- //export api_NewVM
3503
- func api_NewVM(config CGoHandle) CGoHandle {
3519
+ //export api_FromGoValue
3520
+ func api_FromGoValue(val CGoHandle) CGoHandle {
3504
3521
  _saved_thread := C.PyEval_SaveThread()
3505
- cret, __err := api.NewVM(ptrFromHandle_Ptr_api_VMConfig(config))
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_ConvertArguments
3520
3535
  func api_ConvertArguments(args CGoHandle) CGoHandle {
3521
3536
  _saved_thread := C.PyEval_SaveThread()
@@ -3531,21 +3546,6 @@ func api_ConvertArguments(args CGoHandle) CGoHandle {
3531
3546
  return handleFromPtr_Slice_environment_Value(&cret)
3532
3547
  }
3533
3548
 
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
3549
  //export api_LookupObject
3550
3550
  func api_LookupObject(id *C.char) CGoHandle {
3551
3551
  _saved_thread := C.PyEval_SaveThread()