示例#1
0
static void reset_scanner(GoomSL *gss)
{ /* {{{ */
  gss->num_lines = 0;
  gss->instr = NULL;
  iflow_clean(gss->iflow);

  /* reset variables */
  goom_hash_free(gss->vars);
  gss->vars = goom_hash_new();
  gss->currentNS = 0;
  gss->namespaces[0] = gss->vars;

  goom_hash_free(gss->structIDS);
  gss->structIDS  = goom_hash_new();
  
  while (gss->nbStructID > 0) {
    int i;
    gss->nbStructID--;
    for(i=0;i<gss->gsl_struct[gss->nbStructID]->nbFields;++i)
      free(gss->gsl_struct[gss->nbStructID]->fields[i]);
    free(gss->gsl_struct[gss->nbStructID]);
  }

  gss->compilationOK = 1;

  goom_heap_delete(gss->data_heap);
  gss->data_heap = goom_heap_new();
} /* }}} */
示例#2
0
文件: goomsl.c 项目: 2BReality/xbmc
void gsl_free(GoomSL *gss)
{ /* {{{ */
  iflow_free(gss->iflow);
  goom_hash_free(gss->vars);
  goom_hash_free(gss->functions);
  goom_hash_free(gss->structIDS);
  free(gss->gsl_struct);
  goom_heap_delete(gss->data_heap);
  free(gss->ptrArray);
  free(gss);
} /* }}} */
示例#3
0
void iflow_clean(InstructionFlow *_this)
{ /* {{{ */
  /* TODO: clean chaque instruction du flot */
  _this->number = 0;
  goom_hash_free(_this->labels);
  _this->labels = goom_hash_new();
} /* }}} */
示例#4
0
void iflow_free(InstructionFlow *_this)
{ /* {{{ */
  goom_hash_free(_this->labels);
  free(_this); /*TODO: finir cette fonction */
} /* }}} */