Replaced external use of THREAD_LOCAL variables with functions
svn: r11607
This commit is contained in:
parent
7535688255
commit
8fd30fa556
|
@ -1034,18 +1034,23 @@ static int check_eventspace_inactive(void *_c)
|
|||
void mred_wait_eventspace(void)
|
||||
{
|
||||
MrEdContext *c;
|
||||
Scheme_Thread *thread;
|
||||
c = MrEdGetContext();
|
||||
if (c && (c->handler_running == scheme_current_thread)) {
|
||||
thread = scheme_get_current_thread();
|
||||
if (c && (c->handler_running == thread)) {
|
||||
wxDispatchEventsUntilWaitable(check_eventspace_inactive, c, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
int mred_current_thread_is_handler(void *ctx)
|
||||
{
|
||||
Scheme_Thread *thread;
|
||||
thread = scheme_get_current_thread();
|
||||
|
||||
if (!ctx)
|
||||
ctx = MrEdGetContext();
|
||||
|
||||
return (((MrEdContext *)ctx)->handler_running == scheme_current_thread);
|
||||
return (((MrEdContext *)ctx)->handler_running == thread);
|
||||
}
|
||||
|
||||
int mred_in_restricted_context()
|
||||
|
@ -1053,7 +1058,7 @@ int mred_in_restricted_context()
|
|||
#ifdef NEED_HET_PARAM
|
||||
/* see wxHiEventTrampoline for info on mred_het_key: */
|
||||
Scheme_Object *v;
|
||||
if (!scheme_current_thread)
|
||||
if (!scheme_get_current_thread())
|
||||
return 1;
|
||||
|
||||
if (mred_het_key)
|
||||
|
@ -1098,6 +1103,8 @@ static void DoTimer(wxTimer *timer)
|
|||
{
|
||||
int once;
|
||||
mz_jmp_buf *save, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
thread = scheme_get_current_thread();
|
||||
|
||||
if (timer->interval == -1)
|
||||
return;
|
||||
|
@ -1105,12 +1112,14 @@ static void DoTimer(wxTimer *timer)
|
|||
once = timer->one_shot;
|
||||
timer->one_shot = -1;
|
||||
|
||||
save = scheme_current_thread->error_buf;
|
||||
scheme_current_thread->error_buf = &newbuf;
|
||||
save = thread->error_buf;
|
||||
thread->error_buf = &newbuf;
|
||||
if (!scheme_setjmp(newbuf))
|
||||
timer->Notify();
|
||||
scheme_clear_escape();
|
||||
scheme_current_thread->error_buf = save;
|
||||
thread = scheme_get_current_thread();
|
||||
thread->error_buf = save;
|
||||
thread = NULL;
|
||||
|
||||
if (!once && (timer->one_shot == -1) && (timer->interval != -1)
|
||||
&& !((MrEdContext *)timer->context)->killed)
|
||||
|
@ -1159,15 +1168,19 @@ static void GoAhead(MrEdContext *c)
|
|||
} else {
|
||||
GC_CAN_IGNORE MrEdEvent e;
|
||||
mz_jmp_buf *save, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
thread = scheme_get_current_thread();
|
||||
|
||||
memcpy(&e, &c->event, sizeof(MrEdEvent));
|
||||
|
||||
save = scheme_current_thread->error_buf;
|
||||
scheme_current_thread->error_buf = &newbuf;
|
||||
save = thread->error_buf;
|
||||
thread->error_buf = &newbuf;
|
||||
if (!scheme_setjmp(newbuf))
|
||||
MrEdDispatchEvent(&e);
|
||||
scheme_clear_escape();
|
||||
scheme_current_thread->error_buf = save;
|
||||
thread = scheme_get_current_thread();
|
||||
thread->error_buf = save;
|
||||
thread = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1199,15 +1212,19 @@ static void DoTheEvent(MrEdContext *c)
|
|||
if (p != def_dispatch) {
|
||||
Scheme_Object *a[1];
|
||||
mz_jmp_buf *save, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
thread = scheme_get_current_thread();
|
||||
|
||||
a[0] = (Scheme_Object *)c;
|
||||
|
||||
save = scheme_current_thread->error_buf;
|
||||
scheme_current_thread->error_buf = &newbuf;
|
||||
save = thread->error_buf;
|
||||
thread->error_buf = &newbuf;
|
||||
if (!scheme_setjmp(newbuf))
|
||||
scheme_apply_multi(p, 1, a);
|
||||
scheme_clear_escape();
|
||||
scheme_current_thread->error_buf = save;
|
||||
thread = scheme_get_current_thread();
|
||||
thread->error_buf = save;
|
||||
thread = NULL;
|
||||
|
||||
#if 0
|
||||
if (c->ready_to_go)
|
||||
|
@ -1334,10 +1351,12 @@ static Scheme_Object *MrEdDoNextEvent(MrEdContext *c, wxDispatch_Check_Fun alt,
|
|||
void wxDoNextEvent()
|
||||
{
|
||||
MrEdContext *c;
|
||||
Scheme_Thread *thread;
|
||||
c = MrEdGetContext();
|
||||
thread = scheme_get_current_thread();
|
||||
|
||||
if (!c->ready_to_go)
|
||||
if (c->handler_running == scheme_current_thread)
|
||||
if (c->handler_running == thread)
|
||||
MrEdDoNextEvent(c, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
@ -1362,10 +1381,12 @@ int MrEdEventReady(MrEdContext *c)
|
|||
int wxEventReady()
|
||||
{
|
||||
MrEdContext *c;
|
||||
Scheme_Thread *thread;
|
||||
c = MrEdGetContext();
|
||||
thread = scheme_get_current_thread();
|
||||
|
||||
return (!c->ready_to_go
|
||||
&& (c->handler_running == scheme_current_thread)
|
||||
&& (c->handler_running == thread)
|
||||
&& MrEdEventReady(c));
|
||||
}
|
||||
|
||||
|
@ -1389,7 +1410,7 @@ static void WaitForAnEvent_OrDie(MrEdContext *c)
|
|||
c->waiting_for_nested = 0;
|
||||
|
||||
scheme_thread_block(0);
|
||||
scheme_current_thread->ran_some = 1;
|
||||
scheme_set_current_thread_ran_some();
|
||||
|
||||
/* Go back to sleep: */
|
||||
c->ready = 1;
|
||||
|
@ -1435,7 +1456,7 @@ static Scheme_Object *handle_events(void *cx, int, Scheme_Object **)
|
|||
fprintf(stderr, "new thread\n");
|
||||
#endif
|
||||
|
||||
this_thread = scheme_current_thread;
|
||||
this_thread = scheme_get_current_thread();
|
||||
if (!this_thread->name) {
|
||||
Scheme_Object *tn;
|
||||
tn = scheme_intern_symbol("handler");
|
||||
|
@ -1447,7 +1468,7 @@ static Scheme_Object *handle_events(void *cx, int, Scheme_Object **)
|
|||
c->suspended = 0;
|
||||
c->ready = 0;
|
||||
|
||||
scheme_current_thread->error_buf = &newbuf;
|
||||
this_thread->error_buf = &newbuf;
|
||||
if (!scheme_setjmp(newbuf)) {
|
||||
if (!TheMrEdApp->initialized)
|
||||
TheMrEdApp->RealInit();
|
||||
|
@ -1512,7 +1533,7 @@ static int try_q_callback(Scheme_Object *do_it, int hi)
|
|||
return 1;
|
||||
|
||||
if (SCHEME_FALSEP(do_it))
|
||||
scheme_current_thread->ran_some = 1;
|
||||
scheme_set_current_thread_ran_some();
|
||||
|
||||
if (c == mred_main_context)
|
||||
check_q_callbacks(hi, MrEdSameContext, c, 0);
|
||||
|
@ -1543,7 +1564,7 @@ static int try_dispatch(Scheme_Object *do_it)
|
|||
if (!do_it)
|
||||
return 1;
|
||||
if (SCHEME_FALSEP(do_it))
|
||||
scheme_current_thread->ran_some = 1;
|
||||
scheme_set_current_thread_ran_some();
|
||||
|
||||
c = (MrEdContext *)timer->context;
|
||||
|
||||
|
@ -1579,7 +1600,7 @@ static int try_dispatch(Scheme_Object *do_it)
|
|||
return 1;
|
||||
|
||||
if (SCHEME_FALSEP(do_it))
|
||||
scheme_current_thread->ran_some = 1;
|
||||
scheme_set_current_thread_ran_some();
|
||||
|
||||
if (c) {
|
||||
memcpy(&c->event, &e, sizeof(MrEdEvent));
|
||||
|
@ -1671,14 +1692,17 @@ void wxDoEvents()
|
|||
|
||||
if (!try_dispatch(scheme_true)) {
|
||||
do {
|
||||
scheme_current_thread->block_descriptor = -1;
|
||||
scheme_current_thread->blocker = NULL;
|
||||
scheme_current_thread->block_check = CAST_BLKCHK try_dispatch;
|
||||
scheme_current_thread->block_needs_wakeup = CAST_WU wakeup_on_dispatch;
|
||||
Scheme_Thread *thread;
|
||||
thread = scheme_get_current_thread();
|
||||
thread->block_descriptor = -1;
|
||||
thread->blocker = NULL;
|
||||
thread->block_check = CAST_BLKCHK try_dispatch;
|
||||
thread->block_needs_wakeup = CAST_WU wakeup_on_dispatch;
|
||||
|
||||
scheme_thread_block(0);
|
||||
|
||||
scheme_current_thread->block_descriptor = 0;
|
||||
thread = scheme_get_current_thread();
|
||||
thread->block_descriptor = 0;
|
||||
/* Sets ran_some if it succeeds: */
|
||||
if (try_dispatch(scheme_false))
|
||||
break;
|
||||
|
@ -1690,14 +1714,16 @@ Scheme_Object *wxDispatchEventsUntilWaitable(wxDispatch_Check_Fun f, void *data,
|
|||
{
|
||||
MrEdContext *c;
|
||||
Scheme_Object *result = scheme_void;
|
||||
Scheme_Thread *thread;
|
||||
|
||||
c = MrEdGetContext();
|
||||
#ifdef wx_mac
|
||||
wxMouseEventHandled();
|
||||
#endif
|
||||
|
||||
thread = scheme_get_current_thread();
|
||||
if (c->ready_to_go
|
||||
|| (c->handler_running != scheme_current_thread)) {
|
||||
|| (c->handler_running != thread)) {
|
||||
/* This is not the handler thread or an event still hasn't been
|
||||
dispatched. Wait. */
|
||||
if (w) {
|
||||
|
@ -1956,13 +1982,16 @@ static void remove_q_callback(Q_Callback_Set *cs, Q_Callback *cb)
|
|||
static void call_one_callback(Q_Callback * volatile cb)
|
||||
{
|
||||
mz_jmp_buf *save, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
thread = scheme_get_current_thread();
|
||||
|
||||
save = scheme_current_thread->error_buf;
|
||||
scheme_current_thread->error_buf = &newbuf;
|
||||
save = thread->error_buf;
|
||||
thread->error_buf = &newbuf;
|
||||
if (!scheme_setjmp(newbuf))
|
||||
scheme_apply_multi(cb->callback, 0, NULL);
|
||||
scheme_clear_escape();
|
||||
scheme_current_thread->error_buf = save;
|
||||
thread = scheme_get_current_thread();
|
||||
thread->error_buf = save;
|
||||
}
|
||||
|
||||
static MrEdContext *check_q_callbacks(int hi, int (*test)(MrEdContext *, MrEdContext *),
|
||||
|
@ -2042,7 +2071,7 @@ static void MrEdQueueWindowCallback(wxWindow *wx_window, Scheme_Closed_Prim *scp
|
|||
Q_Callback *cb;
|
||||
Scheme_Object *p;
|
||||
|
||||
if (!scheme_current_thread) {
|
||||
if (!scheme_get_current_thread()) {
|
||||
/* Scheme hasn't started yet, so call directly.
|
||||
We might get here for an update to the stdio
|
||||
window, for example. */
|
||||
|
@ -2637,25 +2666,30 @@ static Scheme_Object *console_reading;
|
|||
|
||||
static void add_console_reading()
|
||||
{
|
||||
Scheme_Thread *thread;
|
||||
thread = scheme_get_current_thread();
|
||||
|
||||
if (!console_reading) {
|
||||
wxREGGLOB(console_reading);
|
||||
console_reading = scheme_null;
|
||||
}
|
||||
|
||||
console_reading = scheme_make_pair((Scheme_Object *)scheme_current_thread,
|
||||
console_reading = scheme_make_pair((Scheme_Object *)thread,
|
||||
console_reading);
|
||||
}
|
||||
|
||||
static void remove_console_reading()
|
||||
{
|
||||
Scheme_Object *p, *prev = NULL;
|
||||
Scheme_Thread *thread;
|
||||
thread = scheme_get_current_thread();
|
||||
|
||||
if (!console_reading)
|
||||
return;
|
||||
|
||||
p = console_reading;
|
||||
while (SCHEME_PAIRP(p)) {
|
||||
if (SAME_OBJ(SCHEME_CAR(p), (Scheme_Object *)scheme_current_thread)) {
|
||||
if (SAME_OBJ(SCHEME_CAR(p), (Scheme_Object *)thread)) {
|
||||
if (prev)
|
||||
SCHEME_CDR(prev) = SCHEME_CDR(p);
|
||||
else
|
||||
|
@ -3234,7 +3268,11 @@ static Scheme_Env *setup_basic_env()
|
|||
|
||||
/* This handler_running pointer gets reset later. Do
|
||||
we really need to set it now? */
|
||||
mred_main_context->handler_running = scheme_current_thread;
|
||||
{
|
||||
Scheme_Thread *thread;
|
||||
thread = scheme_get_current_thread();
|
||||
mred_main_context->handler_running = thread;
|
||||
}
|
||||
|
||||
mzsleep = scheme_sleep;
|
||||
scheme_sleep = CAST_SLEEP MrEdSleep;
|
||||
|
@ -3444,11 +3482,14 @@ static void on_main_killed(Scheme_Thread *p)
|
|||
|
||||
void MrEdApp::RealInit(void)
|
||||
{
|
||||
Scheme_Thread *thread;
|
||||
thread = scheme_get_current_thread();
|
||||
|
||||
initialized = 1;
|
||||
|
||||
wxMediaIOCheckLSB(/* scheme_console_printf */);
|
||||
|
||||
scheme_current_thread->on_kill = CAST_TOK on_main_killed;
|
||||
thread->on_kill = CAST_TOK on_main_killed;
|
||||
#if WINDOW_STDIO
|
||||
if (!wx_in_terminal)
|
||||
scheme_exit = CAST_EXIT MrEdExit;
|
||||
|
@ -3463,7 +3504,7 @@ void MrEdApp::RealInit(void)
|
|||
if (!exit_val)
|
||||
exit_val = mred_finish_cmd_line_run();
|
||||
|
||||
scheme_kill_thread(scheme_current_thread);
|
||||
scheme_kill_thread(thread);
|
||||
}
|
||||
|
||||
#ifdef wx_mac
|
||||
|
@ -3876,6 +3917,8 @@ static void wxDo(Scheme_Object *proc, int argc, Scheme_Object **argv)
|
|||
{
|
||||
mz_jmp_buf * volatile save, newbuf;
|
||||
volatile int block_descriptor;
|
||||
Scheme_Thread *thread;
|
||||
thread = scheme_get_current_thread();
|
||||
|
||||
if (!proc) {
|
||||
/* Oops --- too early. */
|
||||
|
@ -3885,13 +3928,13 @@ static void wxDo(Scheme_Object *proc, int argc, Scheme_Object **argv)
|
|||
/* wxDo might be called when MrEd is sleeping (i.e.,
|
||||
blocked on WNE in OS X). Since we're hijacking the
|
||||
thread, save an restore block information. */
|
||||
block_descriptor = scheme_current_thread->block_descriptor;
|
||||
scheme_current_thread->block_descriptor = 0;
|
||||
block_descriptor = thread->block_descriptor;
|
||||
thread->block_descriptor = 0;
|
||||
|
||||
scheme_start_atomic();
|
||||
|
||||
save = scheme_current_thread->error_buf;
|
||||
scheme_current_thread->error_buf = &newbuf;
|
||||
save = thread->error_buf;
|
||||
thread->error_buf = &newbuf;
|
||||
|
||||
if (scheme_setjmp(newbuf)) {
|
||||
scheme_clear_escape();
|
||||
|
@ -3899,8 +3942,9 @@ static void wxDo(Scheme_Object *proc, int argc, Scheme_Object **argv)
|
|||
scheme_apply(proc, argc, argv);
|
||||
}
|
||||
|
||||
scheme_current_thread->error_buf = save;
|
||||
scheme_current_thread->block_descriptor = block_descriptor;
|
||||
thread = scheme_get_current_thread();
|
||||
thread->error_buf = save;
|
||||
thread->block_descriptor = block_descriptor;
|
||||
|
||||
scheme_end_atomic_no_swap();
|
||||
}
|
||||
|
|
|
@ -1635,7 +1635,12 @@ Bool wxMediaEdit::CheckFlow(double maxw, wxDC *dc, double Y,
|
|||
hadNewline = FALSE;
|
||||
}
|
||||
|
||||
if (scheme_current_thread) SCHEME_USE_FUEL(1);
|
||||
{
|
||||
Scheme_Thread *thread;
|
||||
thread = scheme_get_current_thread();
|
||||
if (thread) SCHEME_USE_FUEL(1);
|
||||
thread = NULL;
|
||||
}
|
||||
|
||||
w = 0.0;
|
||||
snip->GetExtent(dc, _totalWidth, Y, &w);
|
||||
|
|
|
@ -169,6 +169,18 @@ os_wxButton::~os_wxButton()
|
|||
|
||||
static Scheme_Object *os_wxButtonOnDropFile(int n, Scheme_Object *p[]);
|
||||
|
||||
#define ESCAPE_BLOCK(return_code) \
|
||||
thread = scheme_get_current_thread(); \
|
||||
savebuf = thread->error_buf; \
|
||||
thread->error_buf = &newbuf; \
|
||||
if (scheme_setjmp(newbuf)) \
|
||||
{ \
|
||||
thread = scheme_get_current_thread(); \
|
||||
thread->error_buf = savebuf; \
|
||||
scheme_clear_escape(); \
|
||||
return return_code; \
|
||||
}
|
||||
|
||||
void os_wxButton::OnDropFile(epathname x0)
|
||||
{
|
||||
Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
|
||||
|
@ -191,15 +203,17 @@ void os_wxButton::OnDropFile(epathname x0)
|
|||
SET_VAR_STACK();
|
||||
READY_TO_RETURN; ASSELF wxButton::OnDropFile(x0);
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -229,13 +243,14 @@ Bool os_wxButton::PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -272,13 +287,14 @@ Bool os_wxButton::PreOnChar(class wxWindow* x0, class wxKeyEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -349,11 +365,12 @@ void os_wxButton::OnSetFocus()
|
|||
READY_TO_RETURN; ASSELF wxButton::OnSetFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -383,11 +400,12 @@ void os_wxButton::OnKillFocus()
|
|||
READY_TO_RETURN; ASSELF wxButton::OnKillFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -853,6 +871,7 @@ static void CB_TOSCHEME(CB_REALCLASS *realobj, wxCommandEvent *event)
|
|||
Scheme_Object *p[2];
|
||||
Scheme_Class_Object *obj;
|
||||
mz_jmp_buf savebuf;
|
||||
Scheme_Thread *thread;
|
||||
SETUP_VAR_STACK(4);
|
||||
VAR_STACK_PUSH(0, obj);
|
||||
VAR_STACK_PUSH(1, event);
|
||||
|
@ -872,12 +891,14 @@ static void CB_TOSCHEME(CB_REALCLASS *realobj, wxCommandEvent *event)
|
|||
p[0] = (Scheme_Object *)obj;
|
||||
p[1] = WITH_VAR_STACK(objscheme_bundle_wxCommandEvent(event));
|
||||
|
||||
COPY_JMPBUF(savebuf, scheme_error_buf);
|
||||
thread = scheme_get_current_thread();
|
||||
COPY_JMPBUF(savebuf, *(thread->error_buf));
|
||||
|
||||
if (!scheme_setjmp(scheme_error_buf))
|
||||
if (!scheme_setjmp(*(thread->error_buf)))
|
||||
WITH_VAR_STACK(scheme_apply_multi(((CALLBACKCLASS *)obj->primdata)->callback_closure, 2, p));
|
||||
|
||||
COPY_JMPBUF(scheme_error_buf, savebuf);
|
||||
thread = scheme_get_current_thread();
|
||||
COPY_JMPBUF(*(thread->error_buf), savebuf);
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
|
|
@ -315,12 +315,13 @@ void os_wxChoice::OnDropFile(epathname x0)
|
|||
READY_TO_RETURN; ASSELF wxChoice::OnDropFile(x0);
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -352,13 +353,14 @@ Bool os_wxChoice::PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -395,13 +397,14 @@ Bool os_wxChoice::PreOnChar(class wxWindow* x0, class wxKeyEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -472,11 +475,12 @@ void os_wxChoice::OnSetFocus()
|
|||
READY_TO_RETURN; ASSELF wxChoice::OnSetFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -506,11 +510,12 @@ void os_wxChoice::OnKillFocus()
|
|||
READY_TO_RETURN; ASSELF wxChoice::OnKillFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -988,6 +993,7 @@ static void CB_TOSCHEME(CB_REALCLASS *realobj, wxCommandEvent *event)
|
|||
Scheme_Object *p[2];
|
||||
Scheme_Class_Object *obj;
|
||||
mz_jmp_buf savebuf;
|
||||
Scheme_Thread *thread;
|
||||
SETUP_VAR_STACK(4);
|
||||
VAR_STACK_PUSH(0, obj);
|
||||
VAR_STACK_PUSH(1, event);
|
||||
|
@ -1007,12 +1013,14 @@ static void CB_TOSCHEME(CB_REALCLASS *realobj, wxCommandEvent *event)
|
|||
p[0] = (Scheme_Object *)obj;
|
||||
p[1] = WITH_VAR_STACK(objscheme_bundle_wxCommandEvent(event));
|
||||
|
||||
COPY_JMPBUF(savebuf, scheme_error_buf);
|
||||
thread = scheme_get_current_thread();
|
||||
COPY_JMPBUF(savebuf, *(thread->error_buf));
|
||||
|
||||
if (!scheme_setjmp(scheme_error_buf))
|
||||
if (!scheme_setjmp(*(thread->error_buf)))
|
||||
WITH_VAR_STACK(scheme_apply_multi(((CALLBACKCLASS *)obj->primdata)->callback_closure, 2, p));
|
||||
|
||||
COPY_JMPBUF(scheme_error_buf, savebuf);
|
||||
thread = scheme_get_current_thread();
|
||||
COPY_JMPBUF(*(thread->error_buf), savebuf);
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
|
|
@ -196,12 +196,13 @@ void os_wxCheckBox::OnDropFile(epathname x0)
|
|||
READY_TO_RETURN; ASSELF wxCheckBox::OnDropFile(x0);
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -233,13 +234,14 @@ Bool os_wxCheckBox::PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -276,13 +278,14 @@ Bool os_wxCheckBox::PreOnChar(class wxWindow* x0, class wxKeyEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1);
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -353,11 +356,12 @@ void os_wxCheckBox::OnSetFocus()
|
|||
READY_TO_RETURN; ASSELF wxCheckBox::OnSetFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -387,11 +391,12 @@ void os_wxCheckBox::OnKillFocus()
|
|||
READY_TO_RETURN; ASSELF wxCheckBox::OnKillFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -878,6 +883,7 @@ static void CB_TOSCHEME(CB_REALCLASS *realobj, wxCommandEvent *event)
|
|||
Scheme_Object *p[2];
|
||||
Scheme_Class_Object *obj;
|
||||
mz_jmp_buf savebuf;
|
||||
Scheme_Thread *thread;
|
||||
SETUP_VAR_STACK(4);
|
||||
VAR_STACK_PUSH(0, obj);
|
||||
VAR_STACK_PUSH(1, event);
|
||||
|
@ -897,12 +903,14 @@ static void CB_TOSCHEME(CB_REALCLASS *realobj, wxCommandEvent *event)
|
|||
p[0] = (Scheme_Object *)obj;
|
||||
p[1] = WITH_VAR_STACK(objscheme_bundle_wxCommandEvent(event));
|
||||
|
||||
COPY_JMPBUF(savebuf, scheme_error_buf);
|
||||
thread = scheme_get_current_thread();
|
||||
COPY_JMPBUF(savebuf, *(thread->error_buf));
|
||||
|
||||
if (!scheme_setjmp(scheme_error_buf))
|
||||
if (!scheme_setjmp(*(thread->error_buf)))
|
||||
WITH_VAR_STACK(scheme_apply_multi(((CALLBACKCLASS *)obj->primdata)->callback_closure, 2, p));
|
||||
|
||||
COPY_JMPBUF(scheme_error_buf, savebuf);
|
||||
thread = scheme_get_current_thread();
|
||||
COPY_JMPBUF(*(thread->error_buf), savebuf);
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
|
|
@ -266,12 +266,13 @@ void os_wxCanvas::OnDropFile(epathname x0)
|
|||
READY_TO_RETURN; ASSELF wxCanvas::OnDropFile(x0);
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -303,13 +304,14 @@ Bool os_wxCanvas::PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1);
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -346,13 +348,14 @@ Bool os_wxCanvas::PreOnChar(class wxWindow* x0, class wxKeyEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -423,11 +426,12 @@ void os_wxCanvas::OnSetFocus()
|
|||
READY_TO_RETURN; ASSELF wxCanvas::OnSetFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -457,11 +461,12 @@ void os_wxCanvas::OnKillFocus()
|
|||
READY_TO_RETURN; ASSELF wxCanvas::OnKillFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -492,12 +497,13 @@ void os_wxCanvas::OnScroll(class wxScrollEvent* x0)
|
|||
READY_TO_RETURN; ASSELF wxCanvas::OnScroll(x0);
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxScrollEvent(x0));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -528,12 +534,13 @@ void os_wxCanvas::OnChar(class wxKeyEvent* x0)
|
|||
READY_TO_RETURN; ASSELF wxCanvas::OnChar(x0);
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x0));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -564,12 +571,13 @@ void os_wxCanvas::OnEvent(class wxMouseEvent* x0)
|
|||
READY_TO_RETURN; ASSELF wxCanvas::OnEvent(x0);
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x0));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -599,11 +607,12 @@ void os_wxCanvas::OnPaint()
|
|||
READY_TO_RETURN; ASSELF wxCanvas::OnPaint();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
|
|
@ -257,12 +257,13 @@ void os_wxFrame::OnDropFile(epathname x0)
|
|||
READY_TO_RETURN; ASSELF wxFrame::OnDropFile(x0);
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -294,13 +295,14 @@ Bool os_wxFrame::PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -337,13 +339,14 @@ Bool os_wxFrame::PreOnChar(class wxWindow* x0, class wxKeyEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -414,11 +417,12 @@ void os_wxFrame::OnSetFocus()
|
|||
READY_TO_RETURN; ASSELF wxFrame::OnSetFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -448,11 +452,12 @@ void os_wxFrame::OnKillFocus()
|
|||
READY_TO_RETURN; ASSELF wxFrame::OnKillFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -620,11 +625,12 @@ Bool os_wxFrame::OnClose()
|
|||
READY_TO_RETURN; return ASSELF wxFrame::OnClose();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 0; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(0)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -659,12 +665,13 @@ void os_wxFrame::OnActivate(Bool x0)
|
|||
READY_TO_RETURN; ASSELF wxFrame::OnActivate(x0);
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = (x0 ? scheme_true : scheme_false);
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
|
|
@ -202,12 +202,13 @@ void os_wxsGauge::OnDropFile(epathname x0)
|
|||
READY_TO_RETURN; ASSELF wxsGauge::OnDropFile(x0);
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -239,13 +240,14 @@ Bool os_wxsGauge::PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -282,13 +284,14 @@ Bool os_wxsGauge::PreOnChar(class wxWindow* x0, class wxKeyEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -359,11 +362,12 @@ void os_wxsGauge::OnSetFocus()
|
|||
READY_TO_RETURN; ASSELF wxsGauge::OnSetFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -393,11 +397,12 @@ void os_wxsGauge::OnKillFocus()
|
|||
READY_TO_RETURN; ASSELF wxsGauge::OnKillFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
|
|
@ -396,12 +396,13 @@ void os_wxMessage::OnDropFile(epathname x0)
|
|||
READY_TO_RETURN; ASSELF wxMessage::OnDropFile(x0);
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -433,13 +434,14 @@ Bool os_wxMessage::PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -476,13 +478,14 @@ Bool os_wxMessage::PreOnChar(class wxWindow* x0, class wxKeyEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -553,11 +556,12 @@ void os_wxMessage::OnSetFocus()
|
|||
READY_TO_RETURN; ASSELF wxMessage::OnSetFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -587,11 +591,12 @@ void os_wxMessage::OnKillFocus()
|
|||
READY_TO_RETURN; ASSELF wxMessage::OnKillFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
|
|
@ -353,13 +353,14 @@ void os_wxListBox::OnDropFile(epathname x0)
|
|||
READY_TO_RETURN; ASSELF wxListBox::OnDropFile(x0);
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
}
|
||||
|
@ -390,13 +391,14 @@ Bool os_wxListBox::PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -433,13 +435,14 @@ Bool os_wxListBox::PreOnChar(class wxWindow* x0, class wxKeyEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -510,11 +513,12 @@ void os_wxListBox::OnSetFocus()
|
|||
READY_TO_RETURN; ASSELF wxListBox::OnSetFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -544,11 +548,12 @@ void os_wxListBox::OnKillFocus()
|
|||
READY_TO_RETURN; ASSELF wxListBox::OnKillFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -1320,6 +1325,7 @@ static void CB_TOSCHEME(CB_REALCLASS *realobj, wxCommandEvent *event)
|
|||
Scheme_Object *p[2];
|
||||
Scheme_Class_Object *obj;
|
||||
mz_jmp_buf savebuf;
|
||||
Scheme_Thread *thread;
|
||||
SETUP_VAR_STACK(4);
|
||||
VAR_STACK_PUSH(0, obj);
|
||||
VAR_STACK_PUSH(1, event);
|
||||
|
@ -1339,12 +1345,14 @@ static void CB_TOSCHEME(CB_REALCLASS *realobj, wxCommandEvent *event)
|
|||
p[0] = (Scheme_Object *)obj;
|
||||
p[1] = WITH_VAR_STACK(objscheme_bundle_wxCommandEvent(event));
|
||||
|
||||
COPY_JMPBUF(savebuf, scheme_error_buf);
|
||||
thread = scheme_get_current_thread();
|
||||
COPY_JMPBUF(savebuf, *(thread->error_buf));
|
||||
|
||||
if (!scheme_setjmp(scheme_error_buf))
|
||||
if (!scheme_setjmp(*(thread->error_buf)))
|
||||
WITH_VAR_STACK(scheme_apply_multi(((CALLBACKCLASS *)obj->primdata)->callback_closure, 2, p));
|
||||
|
||||
COPY_JMPBUF(scheme_error_buf, savebuf);
|
||||
thread = scheme_get_current_thread();
|
||||
COPY_JMPBUF(*(thread->error_buf), savebuf);
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
|
|
@ -308,12 +308,13 @@ void os_wxMediaCanvas::OnChar(class wxKeyEvent* x0)
|
|||
READY_TO_RETURN; ASSELF wxMediaCanvas::OnChar(x0);
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x0));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -344,12 +345,13 @@ void os_wxMediaCanvas::OnEvent(class wxMouseEvent* x0)
|
|||
READY_TO_RETURN; ASSELF wxMediaCanvas::OnEvent(x0);
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x0));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -379,11 +381,12 @@ void os_wxMediaCanvas::OnPaint()
|
|||
READY_TO_RETURN; ASSELF wxMediaCanvas::OnPaint();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -414,12 +417,13 @@ void os_wxMediaCanvas::OnDropFile(epathname x0)
|
|||
READY_TO_RETURN; ASSELF wxMediaCanvas::OnDropFile(x0);
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -451,13 +455,14 @@ Bool os_wxMediaCanvas::PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -494,13 +499,14 @@ Bool os_wxMediaCanvas::PreOnChar(class wxWindow* x0, class wxKeyEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -571,11 +577,12 @@ void os_wxMediaCanvas::OnSetFocus()
|
|||
READY_TO_RETURN; ASSELF wxMediaCanvas::OnSetFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -605,11 +612,12 @@ void os_wxMediaCanvas::OnKillFocus()
|
|||
READY_TO_RETURN; ASSELF wxMediaCanvas::OnKillFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
|
|
@ -643,6 +643,7 @@ static void CB_TOSCHEME(CB_REALCLASS *realobj, wxCommandEvent *event)
|
|||
Scheme_Object *p[2];
|
||||
Scheme_Class_Object *obj;
|
||||
mz_jmp_buf savebuf;
|
||||
Scheme_Thread *thread;
|
||||
SETUP_VAR_STACK(4);
|
||||
VAR_STACK_PUSH(0, obj);
|
||||
VAR_STACK_PUSH(1, event);
|
||||
|
@ -662,12 +663,14 @@ static void CB_TOSCHEME(CB_REALCLASS *realobj, wxCommandEvent *event)
|
|||
p[0] = (Scheme_Object *)obj;
|
||||
p[1] = WITH_VAR_STACK(objscheme_bundle_wxCommandEvent(event));
|
||||
|
||||
COPY_JMPBUF(savebuf, scheme_error_buf);
|
||||
thread = scheme_get_current_thread();
|
||||
COPY_JMPBUF(savebuf, *(thread->error_buf));
|
||||
|
||||
if (!scheme_setjmp(scheme_error_buf))
|
||||
if (!scheme_setjmp(*(thread->error_buf)))
|
||||
WITH_VAR_STACK(scheme_apply_multi(((CALLBACKCLASS *)obj->primdata)->callback_closure, 2, p));
|
||||
|
||||
COPY_JMPBUF(scheme_error_buf, savebuf);
|
||||
thread = scheme_get_current_thread();
|
||||
COPY_JMPBUF(*(thread->error_buf), savebuf);
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
|
|
@ -223,13 +223,14 @@ void os_wxPanel::OnDropFile(epathname x0)
|
|||
SET_VAR_STACK();
|
||||
READY_TO_RETURN; ASSELF wxPanel::OnDropFile(x0);
|
||||
} else {
|
||||
Scheme_Thread *thread;
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -261,13 +262,14 @@ Bool os_wxPanel::PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -304,13 +306,14 @@ Bool os_wxPanel::PreOnChar(class wxWindow* x0, class wxKeyEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -381,11 +384,12 @@ void os_wxPanel::OnSetFocus()
|
|||
READY_TO_RETURN; ASSELF wxPanel::OnSetFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -415,11 +419,12 @@ void os_wxPanel::OnKillFocus()
|
|||
READY_TO_RETURN; ASSELF wxPanel::OnKillFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -1158,12 +1163,13 @@ void os_wxDialogBox::OnDropFile(epathname x0)
|
|||
READY_TO_RETURN; ASSELF wxDialogBox::OnDropFile(x0);
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -1195,13 +1201,14 @@ Bool os_wxDialogBox::PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -1238,13 +1245,14 @@ Bool os_wxDialogBox::PreOnChar(class wxWindow* x0, class wxKeyEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -1315,11 +1323,12 @@ void os_wxDialogBox::OnSetFocus()
|
|||
READY_TO_RETURN; ASSELF wxDialogBox::OnSetFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -1349,11 +1358,12 @@ void os_wxDialogBox::OnKillFocus()
|
|||
READY_TO_RETURN; ASSELF wxDialogBox::OnKillFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -1383,11 +1393,12 @@ Bool os_wxDialogBox::OnClose()
|
|||
READY_TO_RETURN; return ASSELF wxDialogBox::OnClose();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 0; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(0)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -1422,12 +1433,13 @@ void os_wxDialogBox::OnActivate(Bool x0)
|
|||
READY_TO_RETURN; ASSELF wxDialogBox::OnActivate(x0);
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = (x0 ? scheme_true : scheme_false);
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
|
|
@ -419,12 +419,13 @@ void os_wxRadioBox::OnDropFile(epathname x0)
|
|||
READY_TO_RETURN; ASSELF wxRadioBox::OnDropFile(x0);
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -456,13 +457,14 @@ Bool os_wxRadioBox::PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -499,13 +501,14 @@ Bool os_wxRadioBox::PreOnChar(class wxWindow* x0, class wxKeyEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -576,11 +579,12 @@ void os_wxRadioBox::OnSetFocus()
|
|||
READY_TO_RETURN; ASSELF wxRadioBox::OnSetFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -610,11 +614,12 @@ void os_wxRadioBox::OnKillFocus()
|
|||
READY_TO_RETURN; ASSELF wxRadioBox::OnKillFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -1156,6 +1161,7 @@ static void CB_TOSCHEME(CB_REALCLASS *realobj, wxCommandEvent *event)
|
|||
Scheme_Object *p[2];
|
||||
Scheme_Class_Object *obj;
|
||||
mz_jmp_buf savebuf;
|
||||
Scheme_Thread *thread;
|
||||
SETUP_VAR_STACK(4);
|
||||
VAR_STACK_PUSH(0, obj);
|
||||
VAR_STACK_PUSH(1, event);
|
||||
|
@ -1175,12 +1181,14 @@ static void CB_TOSCHEME(CB_REALCLASS *realobj, wxCommandEvent *event)
|
|||
p[0] = (Scheme_Object *)obj;
|
||||
p[1] = WITH_VAR_STACK(objscheme_bundle_wxCommandEvent(event));
|
||||
|
||||
COPY_JMPBUF(savebuf, scheme_error_buf);
|
||||
thread = scheme_get_current_thread();
|
||||
COPY_JMPBUF(savebuf, *(thread->error_buf));
|
||||
|
||||
if (!scheme_setjmp(scheme_error_buf))
|
||||
if (!scheme_setjmp(*(thread->error_buf)))
|
||||
WITH_VAR_STACK(scheme_apply_multi(((CALLBACKCLASS *)obj->primdata)->callback_closure, 2, p));
|
||||
|
||||
COPY_JMPBUF(scheme_error_buf, savebuf);
|
||||
thread = scheme_get_current_thread();
|
||||
COPY_JMPBUF(*(thread->error_buf), savebuf);
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
|
|
@ -190,12 +190,13 @@ void os_wxSlider::OnDropFile(epathname x0)
|
|||
READY_TO_RETURN; ASSELF wxSlider::OnDropFile(x0);
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -227,13 +228,14 @@ Bool os_wxSlider::PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -270,13 +272,14 @@ Bool os_wxSlider::PreOnChar(class wxWindow* x0, class wxKeyEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -347,11 +350,12 @@ void os_wxSlider::OnSetFocus()
|
|||
READY_TO_RETURN; ASSELF wxSlider::OnSetFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -381,11 +385,12 @@ void os_wxSlider::OnKillFocus()
|
|||
READY_TO_RETURN; ASSELF wxSlider::OnKillFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -754,6 +759,7 @@ static void CB_TOSCHEME(CB_REALCLASS *realobj, wxCommandEvent *event)
|
|||
Scheme_Object *p[2];
|
||||
Scheme_Class_Object *obj;
|
||||
mz_jmp_buf savebuf;
|
||||
Scheme_Thread *thread;
|
||||
SETUP_VAR_STACK(4);
|
||||
VAR_STACK_PUSH(0, obj);
|
||||
VAR_STACK_PUSH(1, event);
|
||||
|
@ -773,12 +779,14 @@ static void CB_TOSCHEME(CB_REALCLASS *realobj, wxCommandEvent *event)
|
|||
p[0] = (Scheme_Object *)obj;
|
||||
p[1] = WITH_VAR_STACK(objscheme_bundle_wxCommandEvent(event));
|
||||
|
||||
COPY_JMPBUF(savebuf, scheme_error_buf);
|
||||
thread = scheme_get_current_thread();
|
||||
COPY_JMPBUF(savebuf, *(thread->error_buf));
|
||||
|
||||
if (!scheme_setjmp(scheme_error_buf))
|
||||
if (!scheme_setjmp(*(thread->error_buf)))
|
||||
WITH_VAR_STACK(scheme_apply_multi(((CALLBACKCLASS *)obj->primdata)->callback_closure, 2, p));
|
||||
|
||||
COPY_JMPBUF(scheme_error_buf, savebuf);
|
||||
thread = scheme_get_current_thread();
|
||||
COPY_JMPBUF(*(thread->error_buf), savebuf);
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
|
|
@ -338,12 +338,13 @@ void os_wxTabChoice::OnDropFile(epathname x0)
|
|||
READY_TO_RETURN; ASSELF wxTabChoice::OnDropFile(x0);
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -375,13 +376,14 @@ Bool os_wxTabChoice::PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -418,13 +420,14 @@ Bool os_wxTabChoice::PreOnChar(class wxWindow* x0, class wxKeyEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -495,11 +498,12 @@ void os_wxTabChoice::OnSetFocus()
|
|||
READY_TO_RETURN; ASSELF wxTabChoice::OnSetFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -529,11 +533,12 @@ void os_wxTabChoice::OnKillFocus()
|
|||
READY_TO_RETURN; ASSELF wxTabChoice::OnKillFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -1055,6 +1060,7 @@ static void CB_TOSCHEME(CB_REALCLASS *realobj, wxCommandEvent *event)
|
|||
Scheme_Object *p[2];
|
||||
Scheme_Class_Object *obj;
|
||||
mz_jmp_buf savebuf;
|
||||
Scheme_Thread *thread;
|
||||
SETUP_VAR_STACK(4);
|
||||
VAR_STACK_PUSH(0, obj);
|
||||
VAR_STACK_PUSH(1, event);
|
||||
|
@ -1074,12 +1080,14 @@ static void CB_TOSCHEME(CB_REALCLASS *realobj, wxCommandEvent *event)
|
|||
p[0] = (Scheme_Object *)obj;
|
||||
p[1] = WITH_VAR_STACK(objscheme_bundle_wxCommandEvent(event));
|
||||
|
||||
COPY_JMPBUF(savebuf, scheme_error_buf);
|
||||
thread = scheme_get_current_thread();
|
||||
COPY_JMPBUF(savebuf, *(thread->error_buf));
|
||||
|
||||
if (!scheme_setjmp(scheme_error_buf))
|
||||
if (!scheme_setjmp(*(thread->error_buf)))
|
||||
WITH_VAR_STACK(scheme_apply_multi(((CALLBACKCLASS *)obj->primdata)->callback_closure, 2, p));
|
||||
|
||||
COPY_JMPBUF(scheme_error_buf, savebuf);
|
||||
thread = scheme_get_current_thread();
|
||||
COPY_JMPBUF(*(thread->error_buf), savebuf);
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -1184,12 +1192,13 @@ void os_wxGroupBox::OnDropFile(epathname x0)
|
|||
READY_TO_RETURN; ASSELF wxGroupBox::OnDropFile(x0);
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -1221,13 +1230,14 @@ Bool os_wxGroupBox::PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -1264,13 +1274,14 @@ Bool os_wxGroupBox::PreOnChar(class wxWindow* x0, class wxKeyEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -1341,11 +1352,12 @@ void os_wxGroupBox::OnSetFocus()
|
|||
READY_TO_RETURN; ASSELF wxGroupBox::OnSetFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -1375,11 +1387,12 @@ void os_wxGroupBox::OnKillFocus()
|
|||
READY_TO_RETURN; ASSELF wxGroupBox::OnKillFocus();
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
|
|
@ -254,12 +254,13 @@ void os_wxWindow::OnDropFile(epathname x0)
|
|||
{ READY_TO_RETURN; return; }
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -291,13 +292,14 @@ Bool os_wxWindow::PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -334,13 +336,14 @@ Bool os_wxWindow::PreOnChar(class wxWindow* x0, class wxKeyEvent* x1)
|
|||
return FALSE;
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
Scheme_Thread *thread;
|
||||
p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
|
||||
p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x1));
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return 1; }
|
||||
ESCAPE_BLOCK(1)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
{
|
||||
Bool resval;
|
||||
|
@ -411,11 +414,12 @@ void os_wxWindow::OnSetFocus()
|
|||
{ READY_TO_RETURN; return; }
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
@ -445,11 +449,12 @@ void os_wxWindow::OnKillFocus()
|
|||
{ READY_TO_RETURN; return; }
|
||||
} else {
|
||||
mz_jmp_buf *savebuf, newbuf;
|
||||
savebuf = scheme_current_thread->error_buf; scheme_current_thread->error_buf = &newbuf; if (scheme_setjmp(newbuf)) { scheme_current_thread->error_buf = savebuf; scheme_clear_escape(); return; }
|
||||
Scheme_Thread *thread;
|
||||
ESCAPE_BLOCK(/*empty*/)
|
||||
p[0] = (Scheme_Object *) ASSELF __gc_external;
|
||||
|
||||
v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
|
||||
scheme_current_thread->error_buf = savebuf;
|
||||
thread->error_buf = savebuf;
|
||||
|
||||
READY_TO_RETURN;
|
||||
}
|
||||
|
|
|
@ -485,6 +485,7 @@ static void release_context_lock(void *c)
|
|||
void *wxWithGLContext(wxGL *gl, void *thunk, void *alt_evt, int eb)
|
||||
{
|
||||
Scheme_Object **a, *wa[3], *glo, *v;
|
||||
Scheme_Thread *thread;
|
||||
int evts;
|
||||
|
||||
if (!context_sema) {
|
||||
|
@ -494,8 +495,9 @@ void *wxWithGLContext(wxGL *gl, void *thunk, void *alt_evt, int eb)
|
|||
context_sema = scheme_make_sema(1);
|
||||
}
|
||||
|
||||
thread = scheme_get_current_thread();
|
||||
if ((gl == context_lock_holder)
|
||||
&& (context_lock_thread == scheme_current_thread)) {
|
||||
&& (context_lock_thread == thread)) {
|
||||
/* The lock is already held by this GL context. */
|
||||
return _scheme_apply_multi((Scheme_Object *)thunk, 0, NULL);
|
||||
}
|
||||
|
@ -530,7 +532,7 @@ void *wxWithGLContext(wxGL *gl, void *thunk, void *alt_evt, int eb)
|
|||
|
||||
if (v == context_sema) {
|
||||
context_lock_holder = gl;
|
||||
context_lock_thread = scheme_current_thread;
|
||||
context_lock_thread = scheme_get_current_thread();
|
||||
|
||||
a[0] = (Scheme_Object *)thunk;
|
||||
a[1] = glo;
|
||||
|
@ -1384,6 +1386,8 @@ extern void wxPostScriptGetTextExtent(const char *fontname,
|
|||
int sym_map)
|
||||
{
|
||||
if (ps_get_text_extent) {
|
||||
long multiple_count;
|
||||
Scheme_Object **multiple_array;
|
||||
Scheme_Object *a[5], *v;
|
||||
|
||||
v = scheme_make_utf8_string(fontname);
|
||||
|
@ -1399,24 +1403,27 @@ extern void wxPostScriptGetTextExtent(const char *fontname,
|
|||
|
||||
v = scheme_apply_multi(ps_get_text_extent, 5, a);
|
||||
|
||||
multiple_count = scheme_get_multiple_count();
|
||||
multiple_array = scheme_get_multiple_array();
|
||||
if (SAME_OBJ(v, SCHEME_MULTIPLE_VALUES)
|
||||
&& (scheme_multiple_count == 4)) {
|
||||
if (SCHEME_FLTP(scheme_multiple_array[0]))
|
||||
*x = SCHEME_FLT_VAL(scheme_multiple_array[0]);
|
||||
if (SCHEME_FLTP(scheme_multiple_array[1]))
|
||||
*y = SCHEME_FLT_VAL(scheme_multiple_array[1]);
|
||||
&& (multiple_count == 4)) {
|
||||
if (SCHEME_FLTP(multiple_array[0]))
|
||||
*x = SCHEME_FLT_VAL(multiple_array[0]);
|
||||
if (SCHEME_FLTP(multiple_array[1]))
|
||||
*y = SCHEME_FLT_VAL(multiple_array[1]);
|
||||
if (descent)
|
||||
if (SCHEME_FLTP(scheme_multiple_array[2]))
|
||||
*descent = SCHEME_FLT_VAL(scheme_multiple_array[2]);
|
||||
if (SCHEME_FLTP(multiple_array[2]))
|
||||
*descent = SCHEME_FLT_VAL(multiple_array[2]);
|
||||
if (topSpace)
|
||||
if (SCHEME_FLTP(scheme_multiple_array[3]))
|
||||
*topSpace = SCHEME_FLT_VAL(scheme_multiple_array[3]);
|
||||
if (SCHEME_FLTP(multiple_array[3]))
|
||||
*topSpace = SCHEME_FLT_VAL(multiple_array[3]);
|
||||
} else {
|
||||
*x = 0;
|
||||
*y = 0;
|
||||
if (descent) *descent = 0;
|
||||
if (topSpace) *topSpace = 0;
|
||||
}
|
||||
multiple_array = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1099,20 +1099,34 @@ typedef struct Scheme_Thread {
|
|||
#endif
|
||||
|
||||
typedef void (*Scheme_Kill_Action_Func)(void *);
|
||||
#define ESCAPE_BLOCK(return_code) \
|
||||
thread = scheme_get_current_thread(); \
|
||||
savebuf = thread->error_buf; \
|
||||
thread->error_buf = &newbuf; \
|
||||
if (scheme_setjmp(newbuf)) \
|
||||
{ \
|
||||
thread = scheme_get_current_thread(); \
|
||||
thread->error_buf = savebuf; \
|
||||
scheme_clear_escape(); \
|
||||
return return_code; \
|
||||
}
|
||||
|
||||
# define BEGIN_ESCAPEABLE(func, data) \
|
||||
{ mz_jmp_buf * volatile savebuf, newbuf; \
|
||||
Scheme_Thread *thread; \
|
||||
thread = scheme_get_current_thread(); \
|
||||
scheme_push_kill_action((Scheme_Kill_Action_Func)func, (void *)data); \
|
||||
savebuf = scheme_current_thread->error_buf; \
|
||||
scheme_current_thread->error_buf = &newbuf; \
|
||||
savebuf = thread->error_buf; \
|
||||
thread->error_buf = &newbuf; \
|
||||
if (scheme_setjmp(newbuf)) { \
|
||||
scheme_pop_kill_action(); \
|
||||
func(data); \
|
||||
scheme_longjmp(*savebuf, 1); \
|
||||
} else {
|
||||
# define END_ESCAPEABLE() \
|
||||
thread = scheme_get_current_thread(); \
|
||||
scheme_pop_kill_action(); \
|
||||
scheme_current_thread->error_buf = savebuf; } }
|
||||
thread->error_buf = savebuf; } }
|
||||
|
||||
|
||||
/*========================================================================*/
|
||||
|
@ -1390,6 +1404,7 @@ typedef void (*Scheme_Invoke_Proc)(Scheme_Env *env, long phase_shift,
|
|||
|
||||
#define SCHEME_ASSERT(expr,msg) ((expr) ? 1 : (scheme_signal_error(msg), 0))
|
||||
|
||||
#ifndef MZ_USE_PLACES
|
||||
#define scheme_eval_wait_expr (scheme_current_thread->ku.eval.wait_expr)
|
||||
#define scheme_tail_rator (scheme_current_thread->ku.apply.tail_rator)
|
||||
#define scheme_tail_num_rands (scheme_current_thread->ku.apply.tail_num_rands)
|
||||
|
@ -1401,6 +1416,7 @@ typedef void (*Scheme_Invoke_Proc)(Scheme_Env *env, long phase_shift,
|
|||
|
||||
#define scheme_multiple_count (scheme_current_thread->ku.multiple.count)
|
||||
#define scheme_multiple_array (scheme_current_thread->ku.multiple.array)
|
||||
#endif
|
||||
|
||||
#define scheme_setjmpup(b, base, s) scheme_setjmpup_relative(b, base, s, NULL)
|
||||
|
||||
|
@ -1436,11 +1452,21 @@ typedef void (*Scheme_Invoke_Proc)(Scheme_Env *env, long phase_shift,
|
|||
#define _scheme_force_value(v) ((v == SCHEME_TAIL_CALL_WAITING) ? scheme_force_value(v) : v)
|
||||
|
||||
#define scheme_tail_apply_buffer_wp(n, p) ((p)->tail_buffer)
|
||||
#define scheme_tail_apply_buffer(n) scheme_tail_apply_buffer_wp(n, scheme_current_thread)
|
||||
#define scheme_tail_apply_buffer(n) \
|
||||
{ \
|
||||
Scheme_Thread *thread; \
|
||||
thread = scheme_get_current_thread(); \
|
||||
scheme_tail_apply_buffer_wp(n, thread);\
|
||||
}
|
||||
|
||||
#define _scheme_tail_apply_no_copy_wp_tcw(f, n, args, p, tcw) (p->ku.apply.tail_rator = f, p->ku.apply.tail_rands = args, p->ku.apply.tail_num_rands = n, tcw)
|
||||
#define _scheme_tail_apply_no_copy_wp(f, n, args, p) _scheme_tail_apply_no_copy_wp_tcw(f, n, args, p, SCHEME_TAIL_CALL_WAITING)
|
||||
#define _scheme_tail_apply_no_copy(f, n, args) _scheme_tail_apply_no_copy_wp(f, n, args, scheme_current_thread)
|
||||
#define _scheme_tail_apply_no_copy(f, n, args) \
|
||||
{ \
|
||||
Scheme_Thread *thread; \
|
||||
thread = scheme_get_current_thread(); \
|
||||
_scheme_tail_apply_no_copy_wp(f, n, args, thread) \
|
||||
}
|
||||
|
||||
#define scheme_thread_block_w_thread(t,p) scheme_thread_block(t)
|
||||
|
||||
|
@ -1661,6 +1687,11 @@ MZ_EXTERN int scheme_get_allow_set_undefined();
|
|||
MZ_EXTERN THREAD_LOCAL Scheme_Thread *scheme_current_thread;
|
||||
MZ_EXTERN THREAD_LOCAL Scheme_Thread *scheme_first_thread;
|
||||
#endif
|
||||
MZ_EXTERN Scheme_Thread *scheme_get_current_thread();
|
||||
MZ_EXTERN long scheme_get_multiple_count();
|
||||
MZ_EXTERN Scheme_Object **scheme_get_multiple_array();
|
||||
MZ_EXTERN void scheme_set_current_thread_ran_some();
|
||||
|
||||
|
||||
/* Set these global hooks (optionally): */
|
||||
typedef void (*Scheme_Exit_Proc)(int v);
|
||||
|
|
|
@ -339,6 +339,15 @@ extern THREAD_LOCAL Scheme_Thread *scheme_main_thread;
|
|||
#ifdef MZ_USE_PLACES
|
||||
extern THREAD_LOCAL Scheme_Thread *scheme_current_thread;
|
||||
extern THREAD_LOCAL Scheme_Thread *scheme_first_thread;
|
||||
#define scheme_eval_wait_expr (scheme_current_thread->ku.eval.wait_expr)
|
||||
#define scheme_tail_rator (scheme_current_thread->ku.apply.tail_rator)
|
||||
#define scheme_tail_num_rands (scheme_current_thread->ku.apply.tail_num_rands)
|
||||
#define scheme_tail_rands (scheme_current_thread->ku.apply.tail_rands)
|
||||
#define scheme_overflow_reply (scheme_current_thread->overflow_reply)
|
||||
#define scheme_error_buf *(scheme_current_thread->error_buf)
|
||||
#define scheme_jumping_to_continuation (scheme_current_thread->cjs.jumping_to_continuation)
|
||||
#define scheme_multiple_count (scheme_current_thread->ku.multiple.count)
|
||||
#define scheme_multiple_array (scheme_current_thread->ku.multiple.array)
|
||||
#endif
|
||||
|
||||
typedef struct Scheme_Thread_Set {
|
||||
|
|
|
@ -147,6 +147,9 @@ THREAD_LOCAL Scheme_Thread *scheme_main_thread = NULL;
|
|||
THREAD_LOCAL Scheme_Thread *scheme_first_thread = NULL;
|
||||
|
||||
Scheme_Thread *scheme_get_current_thread() { return scheme_current_thread; }
|
||||
long scheme_get_multiple_count() { return scheme_current_thread->ku.multiple.count; }
|
||||
Scheme_Object **scheme_get_multiple_array() { return scheme_current_thread->ku.multiple.array; }
|
||||
void scheme_set_current_thread_ran_some() { scheme_current_thread->ran_some = 1; }
|
||||
|
||||
THREAD_LOCAL Scheme_Thread_Set *scheme_thread_set_top;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user