Beispiel #1
0
/*#
   @method clear Dictionary
   @brief Removes all the items from this dictionary.
*/
FALCON_FUNC  mth_dictClear ( ::Falcon::VMachine *vm )
{
   Item *dict;
   
   if( vm->self().isMethodic() )
   {
      dict = &vm->self();
   }
   else {
      dict = vm->param(0);
      if( dict == 0  || ! dict->isDict() ) 
      {
         throw new ParamError( ErrorParam( e_inv_params, __LINE__ )
               .origin( e_orig_runtime )
               .extra( "D"  ) );
      }
   }

   CoreDict *d = dict->asDict();
   d->clear();
}