Exemplo n.º 1
0
 /* the cleanup routine for all objects */
  static void
  ft_object_cleanup( FT_Object  object )
  {
    FT_Memory  memory = FT_OBJECT__MEMORY(object);
    FT_Class   clazz  = FT_OBJECT__CLASS(object);

    if ( clazz->obj_done )
      clazz->obj_done( object );

    FT_FREE( object );
  }
Exemplo n.º 2
0
  ft_object_is_a( FT_Pointer  obj,
                  FT_Class    clazz )
  {
    if ( FT_OBJECT_CHECK(obj) )
    {
      FT_Class   c = FT_OBJECT__CLASS(obj);

      do
      {
        if ( c == clazz )
          return 1;

        c = c->super;
      }
      while ( c == NULL );

      return (clazz == NULL);
    }
    return 0;
  }