Skip to content
  • Peter Crosthwaite's avatar
    qom/object.c: Allow itf cast with num_itfs = 0 · 00e2ceae
    Peter Crosthwaite authored
    
    
    num_interfaces only tells you how many interfaces the concrete child class has
    (as defined in the TypeInfo). This means if you have a child class which defines
    no interfaces of its own, but its parent has interfaces you cannot cast to those
    parent interfaces.
    
    Fixed changing the guard to check the class->interfaces list instead (which is
    a complete flattened list of implemented interfaces).
    
    Signed-off-by: default avatarPeter Crosthwaite <peter.crosthwaite@xilinx.com>
    Message-id: a8c2db3b9b1f3c4bb81aca352b69e33260f36545.1361246206.git.peter.crosthwaite@xilinx.com
    Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
    00e2ceae