Пример #1
0
/***************************************************
  NAME         : EnvUndeffunction
  DESCRIPTION  : External interface routine for
                 removing a deffunction
  INPUTS       : Deffunction pointer
  RETURNS      : FALSE if unsuccessful,
                 TRUE otherwise
  SIDE EFFECTS : Deffunction deleted, if possible
  NOTES        : None
 ***************************************************/
globle intBool EnvUndeffunction(
  void *theEnv,
  EXEC_STATUS,
  void *vptr)
  {
#if (MAC_MCW || WIN_MCW) && (RUN_TIME || BLOAD_ONLY)
#pragma unused(theEnv,execStatus,vptr)
#endif

#if BLOAD_ONLY || RUN_TIME
   return(FALSE);
#else

#if BLOAD || BLOAD_AND_BSAVE

   if (Bloaded(theEnv,execStatus) == TRUE)
     return(FALSE);
#endif
   if (vptr == NULL)
      return(RemoveAllDeffunctions(theEnv,execStatus));
   if (EnvIsDeffunctionDeletable(theEnv,execStatus,vptr) == FALSE)
     return(FALSE);
   RemoveConstructFromModule(theEnv,execStatus,(struct constructHeader *) vptr);
   RemoveDeffunction(theEnv,execStatus,vptr);
   return(TRUE);
#endif
  }
Пример #2
0
/***************************************************
  NAME         : EnvUndeffunction
  DESCRIPTION  : External interface routine for
                 removing a deffunction
  INPUTS       : Deffunction pointer
  RETURNS      : FALSE if unsuccessful,
                 TRUE otherwise
  SIDE EFFECTS : Deffunction deleted, if possible
  NOTES        : None
 ***************************************************/
globle intBool EnvUndeffunction(
  void *theEnv,
  void *vptr)
  {

#if BLOAD_ONLY || RUN_TIME
   return(FALSE);
#else

#if BLOAD || BLOAD_AND_BSAVE

   if (Bloaded(theEnv) == TRUE)
     return(FALSE);
#endif
   if (vptr == NULL)
      return(RemoveAllDeffunctions(theEnv));
   if (EnvIsDeffunctionDeletable(theEnv,vptr) == FALSE)
     return(FALSE);
   RemoveConstructFromModule(theEnv,(struct constructHeader *) vptr);
   RemoveDeffunction(theEnv,vptr);
   return(TRUE);
#endif
  }
Пример #3
0
EXPORT int STDCALL EnvIsDeffunctionDeletable1(void* env, void* ptr)
{
	return EnvIsDeffunctionDeletable(env, ptr);
}
Пример #4
0
bool Function::is_deletable() {
  if ( m_cobj )
    return EnvIsDeffunctionDeletable( m_environment.cobj(), m_cobj );
  return false;
}
Пример #5
0
globle intBool IsDeffunctionDeletable(
  void *ptr)
  {
   return EnvIsDeffunctionDeletable(GetCurrentEnvironment(),ptr);
  }