Changeset eff324 in git for Singular/newstruct.cc


Ignore:
Timestamp:
Aug 1, 2012, 11:04:39 PM (11 years ago)
Author:
Alexander Dreyer <alexander.dreyer@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'c987db42cd2ec943b97ac5746c99892ceddf909c')
Children:
632c3a619d605d6b049c3f7f82a323ea8113e34b
Parents:
ed47aab1ca04dedabc7c40435071af5af05f4c3a
Message:
chg: disclosuring fewer of newstruct
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/newstruct.cc

    red47aab reff324  
    613613   return NULL;
    614614}
    615 
    616 newstruct_desc newstructDesc()
     615newstruct_desc newstructFromString(const char *s)
    617616{
    618617  newstruct_desc res=(newstruct_desc)omAlloc0(sizeof(*res));
    619618  res->size=0;
    620   return res;
    621 }
    622 
    623 newstruct_desc newstructFromString(const char *s)
    624 {
    625   return scanNewstructFromString(s, newstructDesc());
    626 }
    627 
     619
     620  return scanNewstructFromString(s,res);
     621}
    628622newstruct_desc newstructChildFromString(const char *parent, const char *s)
    629623{
     
    670664  blackbox *bb=getBlackboxStuff(id);
    671665  newstruct_desc desc=(newstruct_desc)bb->data;
     666  if (desc == NULL)
     667  {
     668    desc=(newstruct_desc)omAlloc0(sizeof(*desc));
     669    desc->size=0;
     670    bb->data = (void*)desc;
     671  }
     672
    672673  newstruct_proc p=(newstruct_proc)omAlloc(sizeof(*p));
    673674  p->next=desc->procs; desc->procs=p;
Note: See TracChangeset for help on using the changeset viewer.