37 Commits

Author SHA1 Message Date
blueloveTH
6db30e61ce ... 2023-05-27 16:41:47 +08:00
blueloveTH
f57dbba00f make c bindings safe 2023-05-27 16:13:58 +08:00
blueloveTH
f4e3bc2308 ... 2023-05-26 15:48:06 +08:00
blueloveTH
d8afb8d7cf ... 2023-05-26 15:39:44 +08:00
blueloveTH
ea9f7ee97e fix error handler 2023-05-26 15:23:17 +08:00
blueloveTH
313fffb269 Update pocketpy_c.cpp 2023-05-25 13:00:00 +08:00
blueloveTH
e6ca624ea2 Update pocketpy_c.cpp 2023-05-25 12:37:04 +08:00
blueloveTH
e982a4e60b ... 2023-05-25 12:33:48 +08:00
blueloveTH
1d9c565b64 ... 2023-05-25 12:27:45 +08:00
blueloveTH
a96a0740ad ... 2023-05-24 21:40:13 +08:00
blueloveTH
3b66008e50 ... 2023-05-24 19:01:47 +08:00
blueloveTH
29c28b0281 use PK_EXPORT for c apis
...
2023-05-24 18:50:41 +08:00
blueloveTH
f91c83e4a1 ... 2023-05-24 18:20:17 +08:00
blueloveTH
4156e6f932 ... 2023-05-24 17:43:36 +08:00
Kolten Pearson
101752c853 added check on to_type methods so that they will not cause
a crash when the type is wrong
2023-05-09 20:52:02 -06:00
Kolten Pearson
ceab1e0609 added a pkpy_error method 2023-05-09 18:05:43 -06:00
Kolten Pearson
ae34a6304a gcc didn't like us catching the runtime_error 2023-05-08 20:45:59 -06:00
Kolten Pearson
e2bf81d7f2 added a pkpy_vm_push method 2023-05-08 20:41:44 -06:00
Kolten Pearson
8abaebbf9f adjusted exceptions to be back to how they were before, implementation
is brittle but functional for current use cases
2023-05-07 11:58:35 -06:00
blueloveTH
805a7ca01f a tiny change 2023-05-07 19:57:27 +08:00
Kolten Pearson
7de39b0cda switched to NameError for the type of error to use when a global can't
be found
2023-05-06 19:31:48 -06:00
Kolten Pearson
dd2212fbad switched to using vm->AttributeError for missing global 2023-05-06 19:23:41 -06:00
Kolten Pearson
f4d2c401f7 adjusted to change in vm constructor 2023-05-05 18:46:20 -06:00
Kolten Pearson
3d8627410f added a function to check for errors without clearing them 2023-05-02 23:11:41 -06:00
Kolten Pearson
2c96dbe7ea added hook into garbage collector 2023-05-02 22:18:03 -06:00
Kolten Pearson
5852ba7435 switch to using subclass for c virtual machine, strings methods return
strong references, except one new one which returns a weak refrence
2023-05-02 22:08:18 -06:00
Kolten Pearson
d1f9aab008 added operations for working with void* as well as a way to check
if a global exists
2023-05-02 00:35:22 -06:00
Kolten Pearson
54134bfecb adjusted api so that api user is no longer responsible for freeing
returned strings
2023-05-01 23:26:55 -06:00
Kolten Pearson
87a76936d6 fixed test cases failing 2023-05-01 21:17:09 -06:00
Kolten Pearson
669bf8b9b1 adjusted things so that we minimize the number of changes necessary to
the main pocketpy library
2023-05-01 20:35:38 -06:00
Kolten Pearson
527a783d13 cleanup and light refactor (with some renames) 2023-05-01 00:00:02 -06:00
Kolten Pearson
d4b9d354ed finalized initial c api and built tests for it 2023-04-30 23:45:47 -06:00
Kolten Pearson
8244a8a1a4 basic functionality is working much more smoothly thanks to LuaStyleFuncC
also added the code for handling python exceptions
2023-04-30 12:06:27 -06:00
Kolten Pearson
aea01c5aca function calls are working 2023-04-30 11:30:45 -06:00
Kolten Pearson
f701cc1e67 basic proof of concept working 2023-04-29 17:49:26 -06:00
Kolten Pearson
6bdc8fd494 basic stack based api for creating a binding from c to python is functional 2023-04-29 13:33:51 -06:00
Kolten Pearson
9b9a78524e made initial structure for new way of handling c bindings 2023-04-28 23:53:23 -06:00