1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-30 07:03:02 +00:00

Add errorParent to threads.

This commit is contained in:
Calvin Rose
2017-06-19 23:01:34 -04:00
parent 6c597f6b5b
commit 70478a410b
12 changed files with 90 additions and 32 deletions

View File

@@ -24,6 +24,7 @@
#define GST_H_defined
#include <stdint.h>
#include <stdarg.h>
/* String utils */
#define gst_string_raw(s) ((uint32_t *)(s) - 2)
@@ -206,6 +207,7 @@ struct GstThread {
uint32_t capacity;
GstValue *data;
GstThread *parent;
GstThread *errorParent;
enum {
GST_THREAD_PENDING = 0,
GST_THREAD_ALIVE,
@@ -490,10 +492,13 @@ uint32_t gst_count_args(Gst *vm);
/* C Api */
/****/
void gst_module(Gst *vm, const char *packagename, const GstModuleItem *mod);
void gst_module_mutable(Gst *vm, const char *packagename, const GstModuleItem *mod);
void gst_module(Gst *vm, const char *name, const GstModuleItem *mod);
void gst_module_mutable(Gst *vm, const char *name, const GstModuleItem *mod);
void gst_module_put(Gst *vm, const char *packagename, const char *name, GstValue x);
GstValue gst_module_get(Gst *vm, const char *packagename);
void gst_module_put(Gst *vm, const char *packagename, const char *name, GstValue v);
void gst_register_put(Gst *vm, const char *packagename, GstValue mod);
GstValue gst_register_get(Gst *vm, const char *name);
int gst_callc(Gst *vm, GstCFunction fn, int numargs, ...);
/* Wrap data in GstValue */
GstValue gst_wrap_nil();