/[ascend]/trunk/base/generic/compiler/instantiate.c
ViewVC logotype

Diff of /trunk/base/generic/compiler/instantiate.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 97 by jds, Fri Dec 9 03:49:19 2005 UTC revision 114 by jds, Fri Dec 16 00:20:44 2005 UTC
# Line 6015  static Line 6015  static
6015  int NameContainsName(CONST struct Name *n,CONST struct Name *sub)  int NameContainsName(CONST struct Name *n,CONST struct Name *sub)
6016  {  {
6017    struct gl_list_t *nl;    struct gl_list_t *nl;
6018    unsigned long c,len;    unsigned long c,len;                  
6019    struct Expr en;    struct Expr *en;
6020    
6021    assert(n!=NULL);    assert(n!=NULL);
6022    assert(sub!=NULL);    assert(sub!=NULL);
6023    InitVarExpr(&en,n);    en = (struct Expr *)ascmalloc(sizeof(struct Expr));
6024    nl = EvaluateNamesNeededShallow(&en,NULL,NULL);    InitVarExpr(en,n);
6025      nl = EvaluateNamesNeededShallow(en,NULL,NULL);
6026    /* should this function be checking deep instead? can't tell yet. */    /* should this function be checking deep instead? can't tell yet. */
6027    if (nl==NULL || gl_length(nl)==0) {    if (nl==NULL || gl_length(nl)==0) {
6028      return 0; /* should never happen */      return 0; /* should never happen */
# Line 6033  int NameContainsName(CONST struct Name * Line 6034  int NameContainsName(CONST struct Name *
6034      }      }
6035    }    }
6036    gl_destroy(nl);    gl_destroy(nl);
6037      ascfree(en);
6038    return 0;    return 0;
6039  }  }
6040  /*  /*

Legend:
Removed from v.97  
changed lines
  Added in v.114

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22