objective-lol 0.0.1__cp311-cp311-win_amd64.whl → 0.0.2__cp311-cp311-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,6 +2272,44 @@ func Map_string_api_GoValue_keys(handle CGoHandle) CGoHandle {
2272
2272
 
2273
2273
  // ---- Structs ---
2274
2274
 
2275
+ // --- wrapping struct: api.UnknownFunctionHandler ---
2276
+ //
2277
+ //export api_UnknownFunctionHandler_CTor
2278
+ func api_UnknownFunctionHandler_CTor() CGoHandle {
2279
+ return CGoHandle(handleFromPtr_api_UnknownFunctionHandler(&api.UnknownFunctionHandler{}))
2280
+ }
2281
+
2282
+ // --- wrapping struct: api.ClassMethod ---
2283
+ //
2284
+ //export api_ClassMethod_CTor
2285
+ func api_ClassMethod_CTor() CGoHandle {
2286
+ return CGoHandle(handleFromPtr_api_ClassMethod(&api.ClassMethod{}))
2287
+ }
2288
+
2289
+ //export api_ClassMethod_Name_Get
2290
+ func api_ClassMethod_Name_Get(handle CGoHandle) *C.char {
2291
+ op := ptrFromHandle_api_ClassMethod(handle)
2292
+ return C.CString(op.Name)
2293
+ }
2294
+
2295
+ //export api_ClassMethod_Name_Set
2296
+ func api_ClassMethod_Name_Set(handle CGoHandle, val *C.char) {
2297
+ op := ptrFromHandle_api_ClassMethod(handle)
2298
+ op.Name = C.GoString(val)
2299
+ }
2300
+
2301
+ //export api_ClassMethod_Argc_Get
2302
+ func api_ClassMethod_Argc_Get(handle CGoHandle) C.longlong {
2303
+ op := ptrFromHandle_api_ClassMethod(handle)
2304
+ return C.longlong(op.Argc)
2305
+ }
2306
+
2307
+ //export api_ClassMethod_Argc_Set
2308
+ func api_ClassMethod_Argc_Set(handle CGoHandle, val C.longlong) {
2309
+ op := ptrFromHandle_api_ClassMethod(handle)
2310
+ op.Argc = int(val)
2311
+ }
2312
+
2275
2313
  // --- wrapping struct: api.SourceLocation ---
2276
2314
  //
2277
2315
  //export api_SourceLocation_CTor
@@ -2315,213 +2353,439 @@ func api_SourceLocation_Column_Set(handle CGoHandle, val C.longlong) {
2315
2353
  op.Column = int(val)
2316
2354
  }
2317
2355
 
2318
- // --- wrapping struct: api.VM ---
2356
+ // --- wrapping struct: api.ExecutionResult ---
2319
2357
  //
2320
- //export api_VM_CTor
2321
- func api_VM_CTor() CGoHandle {
2322
- return CGoHandle(handleFromPtr_api_VM(&api.VM{}))
2358
+ //export api_ExecutionResult_CTor
2359
+ func api_ExecutionResult_CTor() CGoHandle {
2360
+ return CGoHandle(handleFromPtr_api_ExecutionResult(&api.ExecutionResult{}))
2323
2361
  }
2324
2362
 
2325
- //export api_VM_GetCompatibilityShim
2326
- func api_VM_GetCompatibilityShim(_handle CGoHandle) CGoHandle {
2363
+ //export api_ExecutionResult_Value_Get
2364
+ func api_ExecutionResult_Value_Get(handle CGoHandle) CGoHandle {
2365
+ op := ptrFromHandle_api_ExecutionResult(handle)
2366
+ return handleFromPtr_api_GoValue(&op.Value)
2367
+ }
2368
+
2369
+ //export api_ExecutionResult_Value_Set
2370
+ func api_ExecutionResult_Value_Set(handle CGoHandle, val CGoHandle) {
2371
+ op := ptrFromHandle_api_ExecutionResult(handle)
2372
+ op.Value = *ptrFromHandle_api_GoValue(val)
2373
+ }
2374
+
2375
+ //export api_ExecutionResult_RawValue_Get
2376
+ func api_ExecutionResult_RawValue_Get(handle CGoHandle) CGoHandle {
2377
+ op := ptrFromHandle_api_ExecutionResult(handle)
2378
+ return handleFromPtr_environment_Value(op.RawValue)
2379
+ }
2380
+
2381
+ //export api_ExecutionResult_RawValue_Set
2382
+ func api_ExecutionResult_RawValue_Set(handle CGoHandle, val CGoHandle) {
2383
+ op := ptrFromHandle_api_ExecutionResult(handle)
2384
+ op.RawValue = ptrFromHandle_environment_Value(val)
2385
+ }
2386
+
2387
+ //export api_ExecutionResult_Output_Get
2388
+ func api_ExecutionResult_Output_Get(handle CGoHandle) *C.char {
2389
+ op := ptrFromHandle_api_ExecutionResult(handle)
2390
+ return C.CString(op.Output)
2391
+ }
2392
+
2393
+ //export api_ExecutionResult_Output_Set
2394
+ func api_ExecutionResult_Output_Set(handle CGoHandle, val *C.char) {
2395
+ op := ptrFromHandle_api_ExecutionResult(handle)
2396
+ op.Output = C.GoString(val)
2397
+ }
2398
+
2399
+ // --- wrapping struct: api.GoValue ---
2400
+ //
2401
+ //export api_GoValue_CTor
2402
+ func api_GoValue_CTor() CGoHandle {
2403
+ return CGoHandle(handleFromPtr_api_GoValue(&api.GoValue{}))
2404
+ }
2405
+
2406
+ //export api_GoValue_ID
2407
+ func api_GoValue_ID(_handle CGoHandle) *C.char {
2327
2408
  _saved_thread := C.PyEval_SaveThread()
2328
2409
  defer C.PyEval_RestoreThread(_saved_thread)
2329
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2410
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2330
2411
  if __err != nil {
2331
- return handleFromPtr_Ptr_api_VMCompatibilityShim(nil)
2412
+ return C.CString("")
2332
2413
  }
2333
- return handleFromPtr_Ptr_api_VMCompatibilityShim(gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).GetCompatibilityShim())
2414
+ return C.CString(gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).ID())
2334
2415
 
2335
2416
  }
2336
2417
 
2337
- //export api_VM_Execute
2338
- func api_VM_Execute(_handle CGoHandle, code *C.char) CGoHandle {
2418
+ //export api_GoValue_MarshalJSON
2419
+ func api_GoValue_MarshalJSON(_handle CGoHandle) CGoHandle {
2339
2420
  _saved_thread := C.PyEval_SaveThread()
2340
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2421
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2341
2422
  if __err != nil {
2342
- return handleFromPtr_Ptr_api_ExecutionResult(nil)
2423
+ return handleFromPtr_Slice_byte(nil)
2343
2424
  }
2344
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).Execute(C.GoString(code))
2425
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).MarshalJSON()
2345
2426
 
2346
2427
  C.PyEval_RestoreThread(_saved_thread)
2347
2428
  if __err != nil {
2348
2429
  estr := C.CString(__err.Error())
2349
2430
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2350
2431
  C.free(unsafe.Pointer(estr))
2351
- return handleFromPtr_Ptr_api_ExecutionResult(nil)
2432
+ return handleFromPtr_Slice_byte(nil)
2352
2433
  }
2353
- return handleFromPtr_Ptr_api_ExecutionResult(cret)
2434
+ return handleFromPtr_Slice_byte(&cret)
2354
2435
  }
2355
2436
 
2356
- //export api_VM_ExecuteWithContext
2357
- func api_VM_ExecuteWithContext(_handle CGoHandle, ctx CGoHandle, code *C.char) CGoHandle {
2437
+ //export api_GoValue_Type
2438
+ func api_GoValue_Type(_handle CGoHandle) *C.char {
2358
2439
  _saved_thread := C.PyEval_SaveThread()
2359
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2440
+ defer C.PyEval_RestoreThread(_saved_thread)
2441
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2360
2442
  if __err != nil {
2361
- return handleFromPtr_Ptr_api_ExecutionResult(nil)
2443
+ return C.CString("")
2362
2444
  }
2363
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).ExecuteWithContext(ptrFromHandle_context_Context(ctx), C.GoString(code))
2445
+ return C.CString(gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Type())
2364
2446
 
2365
- C.PyEval_RestoreThread(_saved_thread)
2366
- if __err != nil {
2367
- estr := C.CString(__err.Error())
2368
- C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2369
- C.free(unsafe.Pointer(estr))
2370
- return handleFromPtr_Ptr_api_ExecutionResult(nil)
2371
- }
2372
- return handleFromPtr_Ptr_api_ExecutionResult(cret)
2373
2447
  }
2374
2448
 
2375
- //export api_VM_NewObjectInstance
2376
- func api_VM_NewObjectInstance(_handle CGoHandle, className *C.char) CGoHandle {
2449
+ //export api_GoValue_Int
2450
+ func api_GoValue_Int(_handle CGoHandle) C.longlong {
2377
2451
  _saved_thread := C.PyEval_SaveThread()
2378
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2452
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2379
2453
  if __err != nil {
2380
- return handleFromPtr_api_GoValue(nil)
2454
+ return C.longlong(0)
2381
2455
  }
2382
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).NewObjectInstance(C.GoString(className))
2456
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Int()
2383
2457
 
2384
2458
  C.PyEval_RestoreThread(_saved_thread)
2385
2459
  if __err != nil {
2386
2460
  estr := C.CString(__err.Error())
2387
2461
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2388
2462
  C.free(unsafe.Pointer(estr))
2389
- return handleFromPtr_api_GoValue(nil)
2463
+ return C.longlong(0)
2390
2464
  }
2391
- return handleFromPtr_api_GoValue(&cret)
2465
+ return C.longlong(cret)
2392
2466
  }
2393
2467
 
2394
- //export api_VM_Call
2395
- func api_VM_Call(_handle CGoHandle, functionName *C.char, args CGoHandle) CGoHandle {
2468
+ //export api_GoValue_Float
2469
+ func api_GoValue_Float(_handle CGoHandle) C.double {
2396
2470
  _saved_thread := C.PyEval_SaveThread()
2397
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2471
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2398
2472
  if __err != nil {
2399
- return handleFromPtr_api_GoValue(nil)
2473
+ return C.double(0)
2400
2474
  }
2401
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).Call(C.GoString(functionName), deptrFromHandle_Slice_api_GoValue(args))
2475
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Float()
2402
2476
 
2403
2477
  C.PyEval_RestoreThread(_saved_thread)
2404
2478
  if __err != nil {
2405
2479
  estr := C.CString(__err.Error())
2406
2480
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2407
2481
  C.free(unsafe.Pointer(estr))
2408
- return handleFromPtr_api_GoValue(nil)
2482
+ return C.double(0)
2409
2483
  }
2410
- return handleFromPtr_api_GoValue(&cret)
2484
+ return C.double(cret)
2411
2485
  }
2412
2486
 
2413
- //export api_VM_CallMethod
2414
- func api_VM_CallMethod(_handle CGoHandle, object CGoHandle, methodName *C.char, args CGoHandle) CGoHandle {
2487
+ //export api_GoValue_String
2488
+ func api_GoValue_String(_handle CGoHandle) *C.char {
2415
2489
  _saved_thread := C.PyEval_SaveThread()
2416
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2490
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2417
2491
  if __err != nil {
2418
- return handleFromPtr_api_GoValue(nil)
2492
+ return C.CString("")
2419
2493
  }
2420
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).CallMethod(*ptrFromHandle_api_GoValue(object), C.GoString(methodName), deptrFromHandle_Slice_api_GoValue(args))
2494
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).String()
2421
2495
 
2422
2496
  C.PyEval_RestoreThread(_saved_thread)
2423
2497
  if __err != nil {
2424
2498
  estr := C.CString(__err.Error())
2425
2499
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2426
2500
  C.free(unsafe.Pointer(estr))
2427
- return handleFromPtr_api_GoValue(nil)
2501
+ return C.CString("")
2428
2502
  }
2429
- return handleFromPtr_api_GoValue(&cret)
2503
+ return C.CString(cret)
2430
2504
  }
2431
2505
 
2432
- //export api_VM_DefineVariable
2433
- func api_VM_DefineVariable(_handle CGoHandle, name *C.char, value CGoHandle, constant C.char) *C.char {
2506
+ //export api_GoValue_Bool
2507
+ func api_GoValue_Bool(_handle CGoHandle) C.char {
2434
2508
  _saved_thread := C.PyEval_SaveThread()
2435
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2509
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2436
2510
  if __err != nil {
2437
- return errorGoToPy(nil)
2511
+ return boolGoToPy(false)
2438
2512
  }
2439
- __err = gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).DefineVariable(C.GoString(name), *ptrFromHandle_api_GoValue(value), boolPyToGo(constant))
2513
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Bool()
2440
2514
 
2441
2515
  C.PyEval_RestoreThread(_saved_thread)
2442
2516
  if __err != nil {
2443
2517
  estr := C.CString(__err.Error())
2444
2518
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2445
- return estr
2519
+ C.free(unsafe.Pointer(estr))
2520
+ return boolGoToPy(false)
2446
2521
  }
2447
- return C.CString("")
2522
+ return boolGoToPy(cret)
2448
2523
  }
2449
2524
 
2450
- //export api_VM_SetVariable
2451
- func api_VM_SetVariable(_handle CGoHandle, variableName *C.char, value CGoHandle) *C.char {
2525
+ //export api_GoValue_Slice
2526
+ func api_GoValue_Slice(_handle CGoHandle) CGoHandle {
2452
2527
  _saved_thread := C.PyEval_SaveThread()
2453
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2528
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2454
2529
  if __err != nil {
2455
- return errorGoToPy(nil)
2530
+ return handleFromPtr_Slice_api_GoValue(nil)
2456
2531
  }
2457
- __err = gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).SetVariable(C.GoString(variableName), *ptrFromHandle_api_GoValue(value))
2532
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Slice()
2458
2533
 
2459
2534
  C.PyEval_RestoreThread(_saved_thread)
2460
2535
  if __err != nil {
2461
2536
  estr := C.CString(__err.Error())
2462
2537
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2463
- return estr
2538
+ C.free(unsafe.Pointer(estr))
2539
+ return handleFromPtr_Slice_api_GoValue(nil)
2464
2540
  }
2465
- return C.CString("")
2541
+ return handleFromPtr_Slice_api_GoValue(&cret)
2466
2542
  }
2467
2543
 
2468
- //export api_VM_GetVariable
2469
- func api_VM_GetVariable(_handle CGoHandle, variableName *C.char) CGoHandle {
2544
+ //export api_GoValue_Map
2545
+ func api_GoValue_Map(_handle CGoHandle) CGoHandle {
2470
2546
  _saved_thread := C.PyEval_SaveThread()
2471
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2547
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2472
2548
  if __err != nil {
2473
- return handleFromPtr_api_GoValue(nil)
2549
+ return handleFromPtr_Map_string_api_GoValue(nil)
2474
2550
  }
2475
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).GetVariable(C.GoString(variableName))
2551
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Map()
2476
2552
 
2477
2553
  C.PyEval_RestoreThread(_saved_thread)
2478
2554
  if __err != nil {
2479
2555
  estr := C.CString(__err.Error())
2480
2556
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2481
2557
  C.free(unsafe.Pointer(estr))
2482
- return handleFromPtr_api_GoValue(nil)
2558
+ return handleFromPtr_Map_string_api_GoValue(nil)
2483
2559
  }
2484
- return handleFromPtr_api_GoValue(&cret)
2560
+ return handleFromPtr_Map_string_api_GoValue(&cret)
2485
2561
  }
2486
2562
 
2487
- //export api_VM_DefineClass
2488
- func api_VM_DefineClass(_handle CGoHandle, classDef CGoHandle) *C.char {
2563
+ //export api_GoValue_Object
2564
+ func api_GoValue_Object(_handle CGoHandle) CGoHandle {
2489
2565
  _saved_thread := C.PyEval_SaveThread()
2490
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2566
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
2491
2567
  if __err != nil {
2492
- return errorGoToPy(nil)
2568
+ return handleFromPtr_Ptr_environment_ObjectInstance(nil)
2493
2569
  }
2494
- __err = gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).DefineClass(ptrFromHandle_Ptr_api_ClassDefinition(classDef))
2570
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Object()
2495
2571
 
2496
2572
  C.PyEval_RestoreThread(_saved_thread)
2497
2573
  if __err != nil {
2498
2574
  estr := C.CString(__err.Error())
2499
2575
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2500
- return estr
2576
+ C.free(unsafe.Pointer(estr))
2577
+ return handleFromPtr_Ptr_environment_ObjectInstance(nil)
2501
2578
  }
2502
- return C.CString("")
2579
+ return handleFromPtr_Ptr_environment_ObjectInstance(cret)
2503
2580
  }
2504
2581
 
2505
- // --- wrapping struct: api.VMCompatibilityShim ---
2582
+ // --- wrapping struct: api.VM ---
2506
2583
  //
2507
- //export api_VMCompatibilityShim_CTor
2508
- func api_VMCompatibilityShim_CTor() CGoHandle {
2509
- return CGoHandle(handleFromPtr_api_VMCompatibilityShim(&api.VMCompatibilityShim{}))
2584
+ //export api_VM_CTor
2585
+ func api_VM_CTor() CGoHandle {
2586
+ return CGoHandle(handleFromPtr_api_VM(&api.VM{}))
2510
2587
  }
2511
2588
 
2512
- //export api_VMCompatibilityShim_DefineFunction
2513
- func api_VMCompatibilityShim_DefineFunction(_handle CGoHandle, id *C.char, name *C.char, argc C.longlong, function *C.PyObject) *C.char {
2514
- _fun_arg := function
2589
+ //export api_VM_GetCompatibilityShim
2590
+ func api_VM_GetCompatibilityShim(_handle CGoHandle) CGoHandle {
2515
2591
  _saved_thread := C.PyEval_SaveThread()
2516
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMCompatibilityShim")
2592
+ defer C.PyEval_RestoreThread(_saved_thread)
2593
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2517
2594
  if __err != nil {
2518
- return errorGoToPy(nil)
2595
+ return handleFromPtr_Ptr_api_VMCompatibilityShim(nil)
2519
2596
  }
2520
- __err = gopyh.Embed(vifc, reflect.TypeOf(api.VMCompatibilityShim{})).(*api.VMCompatibilityShim).DefineFunction(C.GoString(id), C.GoString(name), int(argc), func(id string, jsonArgs string) string {
2521
- if C.PyCallable_Check(_fun_arg) == 0 {
2522
- return C.GoString(nil)
2523
- }
2524
- _gstate := C.PyGILState_Ensure()
2597
+ return handleFromPtr_Ptr_api_VMCompatibilityShim(gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).GetCompatibilityShim())
2598
+
2599
+ }
2600
+
2601
+ //export api_VM_Execute
2602
+ func api_VM_Execute(_handle CGoHandle, code *C.char) CGoHandle {
2603
+ _saved_thread := C.PyEval_SaveThread()
2604
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2605
+ if __err != nil {
2606
+ return handleFromPtr_Ptr_api_ExecutionResult(nil)
2607
+ }
2608
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).Execute(C.GoString(code))
2609
+
2610
+ C.PyEval_RestoreThread(_saved_thread)
2611
+ if __err != nil {
2612
+ estr := C.CString(__err.Error())
2613
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2614
+ C.free(unsafe.Pointer(estr))
2615
+ return handleFromPtr_Ptr_api_ExecutionResult(nil)
2616
+ }
2617
+ return handleFromPtr_Ptr_api_ExecutionResult(cret)
2618
+ }
2619
+
2620
+ //export api_VM_ExecuteWithContext
2621
+ func api_VM_ExecuteWithContext(_handle CGoHandle, ctx CGoHandle, code *C.char) CGoHandle {
2622
+ _saved_thread := C.PyEval_SaveThread()
2623
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2624
+ if __err != nil {
2625
+ return handleFromPtr_Ptr_api_ExecutionResult(nil)
2626
+ }
2627
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).ExecuteWithContext(ptrFromHandle_context_Context(ctx), C.GoString(code))
2628
+
2629
+ C.PyEval_RestoreThread(_saved_thread)
2630
+ if __err != nil {
2631
+ estr := C.CString(__err.Error())
2632
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2633
+ C.free(unsafe.Pointer(estr))
2634
+ return handleFromPtr_Ptr_api_ExecutionResult(nil)
2635
+ }
2636
+ return handleFromPtr_Ptr_api_ExecutionResult(cret)
2637
+ }
2638
+
2639
+ //export api_VM_NewObjectInstance
2640
+ func api_VM_NewObjectInstance(_handle CGoHandle, className *C.char) CGoHandle {
2641
+ _saved_thread := C.PyEval_SaveThread()
2642
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2643
+ if __err != nil {
2644
+ return handleFromPtr_api_GoValue(nil)
2645
+ }
2646
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).NewObjectInstance(C.GoString(className))
2647
+
2648
+ C.PyEval_RestoreThread(_saved_thread)
2649
+ if __err != nil {
2650
+ estr := C.CString(__err.Error())
2651
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2652
+ C.free(unsafe.Pointer(estr))
2653
+ return handleFromPtr_api_GoValue(nil)
2654
+ }
2655
+ return handleFromPtr_api_GoValue(&cret)
2656
+ }
2657
+
2658
+ //export api_VM_Call
2659
+ func api_VM_Call(_handle CGoHandle, functionName *C.char, args CGoHandle) CGoHandle {
2660
+ _saved_thread := C.PyEval_SaveThread()
2661
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2662
+ if __err != nil {
2663
+ return handleFromPtr_api_GoValue(nil)
2664
+ }
2665
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).Call(C.GoString(functionName), deptrFromHandle_Slice_api_GoValue(args))
2666
+
2667
+ C.PyEval_RestoreThread(_saved_thread)
2668
+ if __err != nil {
2669
+ estr := C.CString(__err.Error())
2670
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2671
+ C.free(unsafe.Pointer(estr))
2672
+ return handleFromPtr_api_GoValue(nil)
2673
+ }
2674
+ return handleFromPtr_api_GoValue(&cret)
2675
+ }
2676
+
2677
+ //export api_VM_CallMethod
2678
+ func api_VM_CallMethod(_handle CGoHandle, object CGoHandle, methodName *C.char, args CGoHandle) CGoHandle {
2679
+ _saved_thread := C.PyEval_SaveThread()
2680
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2681
+ if __err != nil {
2682
+ return handleFromPtr_api_GoValue(nil)
2683
+ }
2684
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).CallMethod(*ptrFromHandle_api_GoValue(object), C.GoString(methodName), deptrFromHandle_Slice_api_GoValue(args))
2685
+
2686
+ C.PyEval_RestoreThread(_saved_thread)
2687
+ if __err != nil {
2688
+ estr := C.CString(__err.Error())
2689
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2690
+ C.free(unsafe.Pointer(estr))
2691
+ return handleFromPtr_api_GoValue(nil)
2692
+ }
2693
+ return handleFromPtr_api_GoValue(&cret)
2694
+ }
2695
+
2696
+ //export api_VM_DefineVariable
2697
+ func api_VM_DefineVariable(_handle CGoHandle, name *C.char, value CGoHandle, constant C.char) *C.char {
2698
+ _saved_thread := C.PyEval_SaveThread()
2699
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2700
+ if __err != nil {
2701
+ return errorGoToPy(nil)
2702
+ }
2703
+ __err = gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).DefineVariable(C.GoString(name), *ptrFromHandle_api_GoValue(value), boolPyToGo(constant))
2704
+
2705
+ C.PyEval_RestoreThread(_saved_thread)
2706
+ if __err != nil {
2707
+ estr := C.CString(__err.Error())
2708
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2709
+ return estr
2710
+ }
2711
+ return C.CString("")
2712
+ }
2713
+
2714
+ //export api_VM_SetVariable
2715
+ func api_VM_SetVariable(_handle CGoHandle, variableName *C.char, value CGoHandle) *C.char {
2716
+ _saved_thread := C.PyEval_SaveThread()
2717
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2718
+ if __err != nil {
2719
+ return errorGoToPy(nil)
2720
+ }
2721
+ __err = gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).SetVariable(C.GoString(variableName), *ptrFromHandle_api_GoValue(value))
2722
+
2723
+ C.PyEval_RestoreThread(_saved_thread)
2724
+ if __err != nil {
2725
+ estr := C.CString(__err.Error())
2726
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2727
+ return estr
2728
+ }
2729
+ return C.CString("")
2730
+ }
2731
+
2732
+ //export api_VM_GetVariable
2733
+ func api_VM_GetVariable(_handle CGoHandle, variableName *C.char) CGoHandle {
2734
+ _saved_thread := C.PyEval_SaveThread()
2735
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2736
+ if __err != nil {
2737
+ return handleFromPtr_api_GoValue(nil)
2738
+ }
2739
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).GetVariable(C.GoString(variableName))
2740
+
2741
+ C.PyEval_RestoreThread(_saved_thread)
2742
+ if __err != nil {
2743
+ estr := C.CString(__err.Error())
2744
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2745
+ C.free(unsafe.Pointer(estr))
2746
+ return handleFromPtr_api_GoValue(nil)
2747
+ }
2748
+ return handleFromPtr_api_GoValue(&cret)
2749
+ }
2750
+
2751
+ //export api_VM_DefineClass
2752
+ func api_VM_DefineClass(_handle CGoHandle, classDef CGoHandle) *C.char {
2753
+ _saved_thread := C.PyEval_SaveThread()
2754
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VM")
2755
+ if __err != nil {
2756
+ return errorGoToPy(nil)
2757
+ }
2758
+ __err = gopyh.Embed(vifc, reflect.TypeOf(api.VM{})).(*api.VM).DefineClass(ptrFromHandle_Ptr_api_ClassDefinition(classDef))
2759
+
2760
+ C.PyEval_RestoreThread(_saved_thread)
2761
+ if __err != nil {
2762
+ estr := C.CString(__err.Error())
2763
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2764
+ return estr
2765
+ }
2766
+ return C.CString("")
2767
+ }
2768
+
2769
+ // --- wrapping struct: api.VMCompatibilityShim ---
2770
+ //
2771
+ //export api_VMCompatibilityShim_CTor
2772
+ func api_VMCompatibilityShim_CTor() CGoHandle {
2773
+ return CGoHandle(handleFromPtr_api_VMCompatibilityShim(&api.VMCompatibilityShim{}))
2774
+ }
2775
+
2776
+ //export api_VMCompatibilityShim_DefineFunction
2777
+ func api_VMCompatibilityShim_DefineFunction(_handle CGoHandle, id *C.char, name *C.char, argc C.longlong, function *C.PyObject) *C.char {
2778
+ _fun_arg := function
2779
+ _saved_thread := C.PyEval_SaveThread()
2780
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.VMCompatibilityShim")
2781
+ if __err != nil {
2782
+ return errorGoToPy(nil)
2783
+ }
2784
+ __err = gopyh.Embed(vifc, reflect.TypeOf(api.VMCompatibilityShim{})).(*api.VMCompatibilityShim).DefineFunction(C.GoString(id), C.GoString(name), int(argc), func(id string, jsonArgs string) string {
2785
+ if C.PyCallable_Check(_fun_arg) == 0 {
2786
+ return C.GoString(nil)
2787
+ }
2788
+ _gstate := C.PyGILState_Ensure()
2525
2789
  _fcargs := C.PyTuple_New(2)
2526
2790
  C.PyTuple_SetItem(_fcargs, 0, C.gopy_build_string(C.CString(id)))
2527
2791
  C.PyTuple_SetItem(_fcargs, 1, C.gopy_build_string(C.CString(jsonArgs)))
@@ -3061,37 +3325,6 @@ func api_ClassDefinition_UnknownFunctionHandler_Set(handle CGoHandle, val CGoHan
3061
3325
  op.UnknownFunctionHandler = ptrFromHandle_Ptr_api_UnknownFunctionHandler(val)
3062
3326
  }
3063
3327
 
3064
- // --- wrapping struct: api.ClassMethod ---
3065
- //
3066
- //export api_ClassMethod_CTor
3067
- func api_ClassMethod_CTor() CGoHandle {
3068
- return CGoHandle(handleFromPtr_api_ClassMethod(&api.ClassMethod{}))
3069
- }
3070
-
3071
- //export api_ClassMethod_Name_Get
3072
- func api_ClassMethod_Name_Get(handle CGoHandle) *C.char {
3073
- op := ptrFromHandle_api_ClassMethod(handle)
3074
- return C.CString(op.Name)
3075
- }
3076
-
3077
- //export api_ClassMethod_Name_Set
3078
- func api_ClassMethod_Name_Set(handle CGoHandle, val *C.char) {
3079
- op := ptrFromHandle_api_ClassMethod(handle)
3080
- op.Name = C.GoString(val)
3081
- }
3082
-
3083
- //export api_ClassMethod_Argc_Get
3084
- func api_ClassMethod_Argc_Get(handle CGoHandle) C.longlong {
3085
- op := ptrFromHandle_api_ClassMethod(handle)
3086
- return C.longlong(op.Argc)
3087
- }
3088
-
3089
- //export api_ClassMethod_Argc_Set
3090
- func api_ClassMethod_Argc_Set(handle CGoHandle, val C.longlong) {
3091
- op := ptrFromHandle_api_ClassMethod(handle)
3092
- op.Argc = int(val)
3093
- }
3094
-
3095
3328
  // --- wrapping struct: api.ClassVariable ---
3096
3329
  //
3097
3330
  //export api_ClassVariable_CTor
@@ -3135,245 +3368,81 @@ func api_ClassVariable_Locked_Set(handle CGoHandle, val C.char) {
3135
3368
  op.Locked = boolPyToGo(val)
3136
3369
  }
3137
3370
 
3138
- // --- wrapping struct: api.ExecutionResult ---
3139
- //
3140
- //export api_ExecutionResult_CTor
3141
- func api_ExecutionResult_CTor() CGoHandle {
3142
- return CGoHandle(handleFromPtr_api_ExecutionResult(&api.ExecutionResult{}))
3143
- }
3371
+ // ---- Slices ---
3144
3372
 
3145
- //export api_ExecutionResult_Value_Get
3146
- func api_ExecutionResult_Value_Get(handle CGoHandle) CGoHandle {
3147
- op := ptrFromHandle_api_ExecutionResult(handle)
3148
- return handleFromPtr_api_GoValue(&op.Value)
3149
- }
3373
+ // ---- Maps ---
3150
3374
 
3151
- //export api_ExecutionResult_Value_Set
3152
- func api_ExecutionResult_Value_Set(handle CGoHandle, val CGoHandle) {
3153
- op := ptrFromHandle_api_ExecutionResult(handle)
3154
- op.Value = *ptrFromHandle_api_GoValue(val)
3155
- }
3375
+ // ---- Constructors ---
3156
3376
 
3157
- //export api_ExecutionResult_RawValue_Get
3158
- func api_ExecutionResult_RawValue_Get(handle CGoHandle) CGoHandle {
3159
- op := ptrFromHandle_api_ExecutionResult(handle)
3160
- return handleFromPtr_environment_Value(op.RawValue)
3377
+ //export api_WrapBool
3378
+ func api_WrapBool(value C.char) CGoHandle {
3379
+ _saved_thread := C.PyEval_SaveThread()
3380
+ defer C.PyEval_RestoreThread(_saved_thread)
3381
+ cret := api.WrapBool(boolPyToGo(value))
3382
+
3383
+ return handleFromPtr_api_GoValue(&cret)
3161
3384
  }
3162
3385
 
3163
- //export api_ExecutionResult_RawValue_Set
3164
- func api_ExecutionResult_RawValue_Set(handle CGoHandle, val CGoHandle) {
3165
- op := ptrFromHandle_api_ExecutionResult(handle)
3166
- op.RawValue = ptrFromHandle_environment_Value(val)
3167
- }
3168
-
3169
- //export api_ExecutionResult_Output_Get
3170
- func api_ExecutionResult_Output_Get(handle CGoHandle) *C.char {
3171
- op := ptrFromHandle_api_ExecutionResult(handle)
3172
- return C.CString(op.Output)
3173
- }
3174
-
3175
- //export api_ExecutionResult_Output_Set
3176
- func api_ExecutionResult_Output_Set(handle CGoHandle, val *C.char) {
3177
- op := ptrFromHandle_api_ExecutionResult(handle)
3178
- op.Output = C.GoString(val)
3179
- }
3180
-
3181
- // --- wrapping struct: api.GoValue ---
3182
- //
3183
- //export api_GoValue_CTor
3184
- func api_GoValue_CTor() CGoHandle {
3185
- return CGoHandle(handleFromPtr_api_GoValue(&api.GoValue{}))
3186
- }
3187
-
3188
- //export api_GoValue_ID
3189
- func api_GoValue_ID(_handle CGoHandle) *C.char {
3386
+ //export api_WrapObject
3387
+ func api_WrapObject(value CGoHandle) CGoHandle {
3190
3388
  _saved_thread := C.PyEval_SaveThread()
3191
3389
  defer C.PyEval_RestoreThread(_saved_thread)
3192
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
3193
- if __err != nil {
3194
- return C.CString("")
3195
- }
3196
- return C.CString(gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).ID())
3197
-
3198
- }
3199
-
3200
- //export api_GoValue_MarshalJSON
3201
- func api_GoValue_MarshalJSON(_handle CGoHandle) CGoHandle {
3202
- _saved_thread := C.PyEval_SaveThread()
3203
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
3204
- if __err != nil {
3205
- return handleFromPtr_Slice_byte(nil)
3206
- }
3207
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).MarshalJSON()
3390
+ cret := api.WrapObject(ptrFromHandle_Ptr_environment_ObjectInstance(value))
3208
3391
 
3209
- C.PyEval_RestoreThread(_saved_thread)
3210
- if __err != nil {
3211
- estr := C.CString(__err.Error())
3212
- C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3213
- C.free(unsafe.Pointer(estr))
3214
- return handleFromPtr_Slice_byte(nil)
3215
- }
3216
- return handleFromPtr_Slice_byte(&cret)
3392
+ return handleFromPtr_api_GoValue(&cret)
3217
3393
  }
3218
3394
 
3219
- //export api_GoValue_Type
3220
- func api_GoValue_Type(_handle CGoHandle) *C.char {
3395
+ //export api_WrapAny
3396
+ func api_WrapAny(value *C.char) CGoHandle {
3221
3397
  _saved_thread := C.PyEval_SaveThread()
3222
3398
  defer C.PyEval_RestoreThread(_saved_thread)
3223
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
3224
- if __err != nil {
3225
- return C.CString("")
3226
- }
3227
- return C.CString(gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Type())
3228
-
3229
- }
3230
-
3231
- //export api_GoValue_Int
3232
- func api_GoValue_Int(_handle CGoHandle) C.longlong {
3233
- _saved_thread := C.PyEval_SaveThread()
3234
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
3235
- if __err != nil {
3236
- return C.longlong(0)
3237
- }
3238
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Int()
3239
-
3240
- C.PyEval_RestoreThread(_saved_thread)
3241
- if __err != nil {
3242
- estr := C.CString(__err.Error())
3243
- C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3244
- C.free(unsafe.Pointer(estr))
3245
- return C.longlong(0)
3246
- }
3247
- return C.longlong(cret)
3248
- }
3249
-
3250
- //export api_GoValue_Float
3251
- func api_GoValue_Float(_handle CGoHandle) C.double {
3252
- _saved_thread := C.PyEval_SaveThread()
3253
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
3254
- if __err != nil {
3255
- return C.double(0)
3256
- }
3257
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Float()
3258
-
3259
- C.PyEval_RestoreThread(_saved_thread)
3260
- if __err != nil {
3261
- estr := C.CString(__err.Error())
3262
- C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3263
- C.free(unsafe.Pointer(estr))
3264
- return C.double(0)
3265
- }
3266
- return C.double(cret)
3267
- }
3268
-
3269
- //export api_GoValue_String
3270
- func api_GoValue_String(_handle CGoHandle) *C.char {
3271
- _saved_thread := C.PyEval_SaveThread()
3272
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
3273
- if __err != nil {
3274
- return C.CString("")
3275
- }
3276
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).String()
3399
+ cret := api.WrapAny(C.GoString(value))
3277
3400
 
3278
- C.PyEval_RestoreThread(_saved_thread)
3279
- if __err != nil {
3280
- estr := C.CString(__err.Error())
3281
- C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3282
- C.free(unsafe.Pointer(estr))
3283
- return C.CString("")
3284
- }
3285
- return C.CString(cret)
3401
+ return handleFromPtr_api_GoValue(&cret)
3286
3402
  }
3287
3403
 
3288
- //export api_GoValue_Bool
3289
- func api_GoValue_Bool(_handle CGoHandle) C.char {
3404
+ //export api_WrapInt
3405
+ func api_WrapInt(value C.longlong) CGoHandle {
3290
3406
  _saved_thread := C.PyEval_SaveThread()
3291
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
3292
- if __err != nil {
3293
- return boolGoToPy(false)
3294
- }
3295
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Bool()
3407
+ defer C.PyEval_RestoreThread(_saved_thread)
3408
+ cret := api.WrapInt(int64(value))
3296
3409
 
3297
- C.PyEval_RestoreThread(_saved_thread)
3298
- if __err != nil {
3299
- estr := C.CString(__err.Error())
3300
- C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3301
- C.free(unsafe.Pointer(estr))
3302
- return boolGoToPy(false)
3303
- }
3304
- return boolGoToPy(cret)
3410
+ return handleFromPtr_api_GoValue(&cret)
3305
3411
  }
3306
3412
 
3307
- //export api_GoValue_Slice
3308
- func api_GoValue_Slice(_handle CGoHandle) CGoHandle {
3413
+ //export api_ToGoValue
3414
+ func api_ToGoValue(val CGoHandle) CGoHandle {
3309
3415
  _saved_thread := C.PyEval_SaveThread()
3310
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
3311
- if __err != nil {
3312
- return handleFromPtr_Slice_api_GoValue(nil)
3313
- }
3314
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Slice()
3416
+ cret, __err := api.ToGoValue(ptrFromHandle_environment_Value(val))
3315
3417
 
3316
3418
  C.PyEval_RestoreThread(_saved_thread)
3317
3419
  if __err != nil {
3318
3420
  estr := C.CString(__err.Error())
3319
3421
  C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3320
3422
  C.free(unsafe.Pointer(estr))
3321
- return handleFromPtr_Slice_api_GoValue(nil)
3423
+ return handleFromPtr_api_GoValue(nil)
3322
3424
  }
3323
- return handleFromPtr_Slice_api_GoValue(&cret)
3425
+ return handleFromPtr_api_GoValue(&cret)
3324
3426
  }
3325
3427
 
3326
- //export api_GoValue_Map
3327
- func api_GoValue_Map(_handle CGoHandle) CGoHandle {
3428
+ //export api_WrapFloat
3429
+ func api_WrapFloat(value C.double) CGoHandle {
3328
3430
  _saved_thread := C.PyEval_SaveThread()
3329
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
3330
- if __err != nil {
3331
- return handleFromPtr_Map_string_api_GoValue(nil)
3332
- }
3333
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Map()
3431
+ defer C.PyEval_RestoreThread(_saved_thread)
3432
+ cret := api.WrapFloat(float64(value))
3334
3433
 
3335
- C.PyEval_RestoreThread(_saved_thread)
3336
- if __err != nil {
3337
- estr := C.CString(__err.Error())
3338
- C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3339
- C.free(unsafe.Pointer(estr))
3340
- return handleFromPtr_Map_string_api_GoValue(nil)
3341
- }
3342
- return handleFromPtr_Map_string_api_GoValue(&cret)
3434
+ return handleFromPtr_api_GoValue(&cret)
3343
3435
  }
3344
3436
 
3345
- //export api_GoValue_Object
3346
- func api_GoValue_Object(_handle CGoHandle) CGoHandle {
3437
+ //export api_WrapString
3438
+ func api_WrapString(value *C.char) CGoHandle {
3347
3439
  _saved_thread := C.PyEval_SaveThread()
3348
- vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*api.GoValue")
3349
- if __err != nil {
3350
- return handleFromPtr_Ptr_environment_ObjectInstance(nil)
3351
- }
3352
- cret, __err := gopyh.Embed(vifc, reflect.TypeOf(api.GoValue{})).(*api.GoValue).Object()
3353
-
3354
- C.PyEval_RestoreThread(_saved_thread)
3355
- if __err != nil {
3356
- estr := C.CString(__err.Error())
3357
- C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3358
- C.free(unsafe.Pointer(estr))
3359
- return handleFromPtr_Ptr_environment_ObjectInstance(nil)
3360
- }
3361
- return handleFromPtr_Ptr_environment_ObjectInstance(cret)
3362
- }
3440
+ defer C.PyEval_RestoreThread(_saved_thread)
3441
+ cret := api.WrapString(C.GoString(value))
3363
3442
 
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{}))
3443
+ return handleFromPtr_api_GoValue(&cret)
3369
3444
  }
3370
3445
 
3371
- // ---- Slices ---
3372
-
3373
- // ---- Maps ---
3374
-
3375
- // ---- Constructors ---
3376
-
3377
3446
  //export api_NewVM
3378
3447
  func api_NewVM(config CGoHandle) CGoHandle {
3379
3448
  _saved_thread := C.PyEval_SaveThread()
@@ -3397,11 +3466,11 @@ func api_DefaultConfig() CGoHandle {
3397
3466
 
3398
3467
  }
3399
3468
 
3400
- //export api_NewCompileError
3401
- func api_NewCompileError(message *C.char, source CGoHandle) CGoHandle {
3469
+ //export api_NewRuntimeError
3470
+ func api_NewRuntimeError(message *C.char, source CGoHandle) CGoHandle {
3402
3471
  _saved_thread := C.PyEval_SaveThread()
3403
3472
  defer C.PyEval_RestoreThread(_saved_thread)
3404
- return handleFromPtr_Ptr_api_VMError(api.NewCompileError(C.GoString(message), ptrFromHandle_Ptr_api_SourceLocation(source)))
3473
+ return handleFromPtr_Ptr_api_VMError(api.NewRuntimeError(C.GoString(message), ptrFromHandle_Ptr_api_SourceLocation(source)))
3405
3474
 
3406
3475
  }
3407
3476
 
@@ -3413,14 +3482,6 @@ func api_NewTimeoutError(duration C.longlong) CGoHandle {
3413
3482
 
3414
3483
  }
3415
3484
 
3416
- //export api_NewConfigError
3417
- func api_NewConfigError(message *C.char, wrapped *C.char) CGoHandle {
3418
- _saved_thread := C.PyEval_SaveThread()
3419
- defer C.PyEval_RestoreThread(_saved_thread)
3420
- return handleFromPtr_Ptr_api_VMError(api.NewConfigError(C.GoString(message), errors.New(C.GoString(wrapped))))
3421
-
3422
- }
3423
-
3424
3485
  //export api_NewConversionError
3425
3486
  func api_NewConversionError(message *C.char, wrapped *C.char) CGoHandle {
3426
3487
  _saved_thread := C.PyEval_SaveThread()
@@ -3429,89 +3490,28 @@ func api_NewConversionError(message *C.char, wrapped *C.char) CGoHandle {
3429
3490
 
3430
3491
  }
3431
3492
 
3432
- //export api_NewRuntimeError
3433
- func api_NewRuntimeError(message *C.char, source CGoHandle) CGoHandle {
3434
- _saved_thread := C.PyEval_SaveThread()
3435
- defer C.PyEval_RestoreThread(_saved_thread)
3436
- return handleFromPtr_Ptr_api_VMError(api.NewRuntimeError(C.GoString(message), ptrFromHandle_Ptr_api_SourceLocation(source)))
3437
-
3438
- }
3439
-
3440
- //export api_NewClassDefinition
3441
- func api_NewClassDefinition() CGoHandle {
3442
- _saved_thread := C.PyEval_SaveThread()
3443
- defer C.PyEval_RestoreThread(_saved_thread)
3444
- return handleFromPtr_Ptr_api_ClassDefinition(api.NewClassDefinition())
3445
-
3446
- }
3447
-
3448
- //export api_ToGoValue
3449
- func api_ToGoValue(val CGoHandle) CGoHandle {
3450
- _saved_thread := C.PyEval_SaveThread()
3451
- cret, __err := api.ToGoValue(ptrFromHandle_environment_Value(val))
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
- }
3460
- return handleFromPtr_api_GoValue(&cret)
3461
- }
3462
-
3463
- //export api_WrapObject
3464
- func api_WrapObject(value CGoHandle) CGoHandle {
3465
- _saved_thread := C.PyEval_SaveThread()
3466
- defer C.PyEval_RestoreThread(_saved_thread)
3467
- cret := api.WrapObject(ptrFromHandle_Ptr_environment_ObjectInstance(value))
3468
-
3469
- return handleFromPtr_api_GoValue(&cret)
3470
- }
3471
-
3472
- //export api_WrapBool
3473
- func api_WrapBool(value C.char) CGoHandle {
3474
- _saved_thread := C.PyEval_SaveThread()
3475
- defer C.PyEval_RestoreThread(_saved_thread)
3476
- cret := api.WrapBool(boolPyToGo(value))
3477
-
3478
- return handleFromPtr_api_GoValue(&cret)
3479
- }
3480
-
3481
- //export api_WrapString
3482
- func api_WrapString(value *C.char) CGoHandle {
3483
- _saved_thread := C.PyEval_SaveThread()
3484
- defer C.PyEval_RestoreThread(_saved_thread)
3485
- cret := api.WrapString(C.GoString(value))
3486
-
3487
- return handleFromPtr_api_GoValue(&cret)
3488
- }
3489
-
3490
- //export api_WrapInt
3491
- func api_WrapInt(value C.longlong) CGoHandle {
3493
+ //export api_NewCompileError
3494
+ func api_NewCompileError(message *C.char, source CGoHandle) CGoHandle {
3492
3495
  _saved_thread := C.PyEval_SaveThread()
3493
3496
  defer C.PyEval_RestoreThread(_saved_thread)
3494
- cret := api.WrapInt(int64(value))
3497
+ return handleFromPtr_Ptr_api_VMError(api.NewCompileError(C.GoString(message), ptrFromHandle_Ptr_api_SourceLocation(source)))
3495
3498
 
3496
- return handleFromPtr_api_GoValue(&cret)
3497
3499
  }
3498
3500
 
3499
- //export api_WrapAny
3500
- func api_WrapAny(value *C.char) CGoHandle {
3501
+ //export api_NewConfigError
3502
+ func api_NewConfigError(message *C.char, wrapped *C.char) CGoHandle {
3501
3503
  _saved_thread := C.PyEval_SaveThread()
3502
3504
  defer C.PyEval_RestoreThread(_saved_thread)
3503
- cret := api.WrapAny(C.GoString(value))
3505
+ return handleFromPtr_Ptr_api_VMError(api.NewConfigError(C.GoString(message), errors.New(C.GoString(wrapped))))
3504
3506
 
3505
- return handleFromPtr_api_GoValue(&cret)
3506
3507
  }
3507
3508
 
3508
- //export api_WrapFloat
3509
- func api_WrapFloat(value C.double) CGoHandle {
3509
+ //export api_NewClassDefinition
3510
+ func api_NewClassDefinition() CGoHandle {
3510
3511
  _saved_thread := C.PyEval_SaveThread()
3511
3512
  defer C.PyEval_RestoreThread(_saved_thread)
3512
- cret := api.WrapFloat(float64(value))
3513
+ return handleFromPtr_Ptr_api_ClassDefinition(api.NewClassDefinition())
3513
3514
 
3514
- return handleFromPtr_api_GoValue(&cret)
3515
3515
  }
3516
3516
 
3517
3517
  // ---- Functions ---