int pceExistsReference(uintptr_t ref) { Any addr = longToPointer(ref); if ( !isProperObject(addr) || isFreedObj(addr) ) return PCE_FAIL; return PCE_SUCCEED; }
int isProperGoal(PceGoal g) { int dummy; if ( !g ) fail; #if defined(STACK_DIRECTION) && STACK_DIRECTION > 0 if ( (uintptr_t)g > (uintptr_t)&dummy ) /* stack grows up */ #else if ( (uintptr_t)g < (uintptr_t)&dummy ) /* stack grows down */ #endif fail; if ( isProperObject(g->implementation) && isProperObject(g->receiver) ) succeed; fail; }
static void ws_handle_stream_data(XtPointer xp, int *source, XtInputId *id) { Stream s = (Stream)xp; pceMTLock(LOCK_PCE); assert(isProperObject(s)); DEBUG(NAME_stream, Cprintf("handleInputStream(%s)\n", pp(s))); handleInputStream(s); pceMTUnlock(LOCK_PCE); }
int pceExistsAssoc(PceName assoc) { Any addr; if ( !(addr = getObjectAssoc(assoc)) ) return PCE_FAIL; if ( !isProperObject(addr) || isFreedObj(addr) ) return PCE_FAIL; return PCE_SUCCEED; }