// // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo // // The contents of this file are covered under the licence agreement in the // file "LICENCE" distributed with Cforall. // // typeobject.c -- // // Author : Andrew Beach // Created On : Tus Jul 11 15:10:00 2017 // Last Modified By : Andrew Beach // Last Modified On : Tus Jul 12 16:04:00 2017 // Update Count : 0 // #include "typeobject.h" // Takes in two non-null pointers to type_objects. int is_parent( struct __cfa__type_object const * parent, struct __cfa__type_object const * child ) { do { if ( parent == child ) return 1; child = child->parent; } while ( child ); return 0; }