这篇教程C++ st_free_table函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中st_free_table函数的典型用法代码示例。如果您正苦于以下问题:C++ st_free_table函数的具体用法?C++ st_free_table怎么用?C++ st_free_table使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了st_free_table函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: DddmpCuddDdArrayStorePrefixBodystatic intDddmpCuddDdArrayStorePrefixBody ( DdManager *ddMgr /* IN: Manager */, int n /* IN: Number of output nodes to be dumped */, DdNode **f /* IN: Array of output nodes to be dumped */, char **inputNames /* IN: Array of input names (or NULL) */, char **outputNames /* IN: Array of output names (or NULL) */, FILE *fp /* IN: Pointer to the dump file */ ){ st_table *visited = NULL; int retValue; int i; /* Initialize symbol table for visited nodes. */ visited = st_init_table(st_ptrcmp, st_ptrhash); Dddmp_CheckAndGotoLabel (visited==NULL, "Error if function st_init_table.", failure); /* Call the function that really gets the job done. */ for (i = 0; i < n; i++) { retValue = DddmpCuddDdArrayStorePrefixStep (ddMgr, Cudd_Regular(f[i]), fp, visited, inputNames); Dddmp_CheckAndGotoLabel (retValue==0, "Error if function DddmpCuddDdArrayStorePrefixStep.", failure); } /* To account for the possible complement on the root, ** we put either a buffer or an inverter at the output of ** the multiplexer representing the top node. */ for (i=0; i<n; i++) { if (outputNames == NULL) { retValue = fprintf (fp, "(BUF outNode%d ", i); } else { retValue = fprintf (fp, "(BUF %s ", outputNames[i]); } Dddmp_CheckAndGotoLabel (retValue==EOF, "Error during file store.", failure); if (Cudd_IsComplement(f[i])) { retValue = fprintf (fp, "(NOT node%" PRIxPTR "))/n", (ptruint) f[i] / sizeof(DdNode)); } else { retValue = fprintf (fp, "node%" PRIxPTR ")/n", (ptruint) f[i] / sizeof(DdNode)); } Dddmp_CheckAndGotoLabel (retValue==EOF, "Error during file store.", failure); } st_free_table (visited); return(1);failure: if (visited != NULL) st_free_table(visited); return(0);}
开发者ID:kleinj,项目名称:prism-svn,代码行数:60,
示例2: deallocstatic void dealloc(xmlDocPtr doc){ st_table *node_hash; NOKOGIRI_DEBUG_START(doc); node_hash = DOC_UNLINKED_NODE_HASH(doc); st_foreach(node_hash, dealloc_node_i, (st_data_t)doc); st_free_table(node_hash); free(doc->_private); /* When both Nokogiri and libxml-ruby are loaded, make sure that all nodes * have their _private pointers cleared. This is to avoid libxml-ruby's * xmlDeregisterNode callback from accessing VALUE pointers from ruby's GC * free context, which can result in segfaults. */ if (xmlDeregisterNodeDefaultValue) remove_private((xmlNodePtr)doc); xmlFreeDoc(doc); NOKOGIRI_DEBUG_END(doc);}
开发者ID:a-ramamurthy,项目名称:rails-decal-proj-2,代码行数:25,
示例3: ruby_vm_destructintruby_vm_destruct(void *ptr){ RUBY_FREE_ENTER("vm"); if (ptr) { rb_vm_t *vm = ptr; rb_thread_t *th = vm->main_thread;#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE struct rb_objspace *objspace = vm->objspace;#endif rb_gc_force_recycle(vm->self); vm->main_thread = 0; if (th) { thread_free(th); } if (vm->living_threads) { st_free_table(vm->living_threads); vm->living_threads = 0; } rb_thread_lock_unlock(&vm->global_vm_lock); rb_thread_lock_destroy(&vm->global_vm_lock); ruby_xfree(vm); ruby_current_vm = 0;#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE if (objspace) { rb_objspace_free(objspace); }#endif } RUBY_FREE_LEAVE("vm"); return 0;}
开发者ID:qnighy,项目名称:ruby-1.9.2p0,代码行数:32,
示例4: avro_schema_unionavro_schema_t avro_schema_union(void){ struct avro_union_schema_t *schema = (struct avro_union_schema_t *) avro_new(struct avro_union_schema_t); if (!schema) { avro_set_error("Cannot allocate new union schema"); return NULL; } schema->branches = st_init_numtable_with_size(DEFAULT_TABLE_SIZE); if (!schema->branches) { avro_set_error("Cannot allocate new union schema"); avro_freet(struct avro_union_schema_t, schema); return NULL; } schema->branches_byname = st_init_strtable_with_size(DEFAULT_TABLE_SIZE); if (!schema->branches_byname) { avro_set_error("Cannot allocate new union schema"); st_free_table(schema->branches); avro_freet(struct avro_union_schema_t, schema); return NULL; } avro_schema_init(&schema->obj, AVRO_UNION); return &schema->obj;}
开发者ID:AlexChen12,项目名称:avro,代码行数:26,
|