source: src/libcfa/typeobject.c @ bac5158

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since bac5158 was 6ea87486, checked in by Andrew Beach <ajbeach@…>, 7 years ago

That should be all the base code for 'tree structures' to work.

  • Property mode set to 100644
File size: 704 bytes
Line 
1//
2// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// typeobject.c --
8//
9// Author           : Andrew Beach
10// Created On       : Tus Jul 11 15:10:00 2017
11// Last Modified By : Andrew Beach
12// Last Modified On : Tus Jul 12 16:04:00 2017
13// Update Count     : 0
14//
15
16#include "typeobject.h"
17
18// Takes in two non-null pointers to type_objects.
19int is_parent( struct __cfa__type_object const * parent,
20               struct __cfa__type_object const * child ) {
21        do {
22                if ( parent == child )
23                        return 1;
24                child = child->parent;
25        } while ( child );
26        return 0;
27}
Note: See TracBrowser for help on using the repository browser.