Пример #1
0
int
pceExistsReference(uintptr_t ref)
{ Any addr = longToPointer(ref);

  if ( !isProperObject(addr) || isFreedObj(addr) )
    return PCE_FAIL;

  return PCE_SUCCEED;
}
Пример #2
0
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;
}
Пример #3
0
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);
}
Пример #4
0
int
pceExistsAssoc(PceName assoc)
{ Any addr;

  if ( !(addr = getObjectAssoc(assoc)) )
    return PCE_FAIL;
  if ( !isProperObject(addr) || isFreedObj(addr) )
    return PCE_FAIL;

  return PCE_SUCCEED;
}