当前位置: 首页>>代码示例>>C++>>正文


C++ xdfree函数代码示例

本文整理汇总了C++中xdfree函数的典型用法代码示例。如果您正苦于以下问题:C++ xdfree函数的具体用法?C++ xdfree怎么用?C++ xdfree使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了xdfree函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: xdebug_xml_text_node_dtor

static void xdebug_xml_text_node_dtor(xdebug_xml_text_node* node)
{
	if (node->free_value && node->text) {
		xdfree(node->text);
	}
	xdfree(node);
}
开发者ID:atis,项目名称:xdebug,代码行数:7,代码来源:xdebug_xml.c

示例2: xdebug_coverage_file_dtor

void xdebug_coverage_file_dtor(void *data)
{
	xdebug_coverage_file *file = (xdebug_coverage_file *) data;

	xdebug_hash_destroy(file->lines);
	xdfree(file->name);
	xdfree(file);
}
开发者ID:ClemensSahs,项目名称:xdebug,代码行数:8,代码来源:xdebug_code_coverage.c

示例3: xdebug_monitored_function_dtor

void xdebug_monitored_function_dtor(void *dummy, void *elem)
{
	xdebug_monitored_function_entry *mfe = (xdebug_monitored_function_entry*) elem;

	xdfree(mfe->func_name);
	xdfree(mfe->filename);
	xdfree(mfe);
}
开发者ID:nly,项目名称:xdebug,代码行数:8,代码来源:xdebug_monitor.c

示例4: xdebug_coverage_function_dtor

void xdebug_coverage_function_dtor(void *data)
{
	xdebug_coverage_function *function = (xdebug_coverage_function *) data;

	if (function->branch_info) {
		xdebug_branch_info_free(function->branch_info);
	}
	xdfree(function->name);
	xdfree(function);
}
开发者ID:kaplanlior,项目名称:xdebug,代码行数:10,代码来源:xdebug_code_coverage.c

示例5: xdebug_profile_aggr_call_entry_dtor

void xdebug_profile_aggr_call_entry_dtor(void *elem)
{
	xdebug_aggregate_entry *xae = (xdebug_aggregate_entry *) elem;
	if (xae->filename) {
		xdfree(xae->filename);
	}
	if (xae->function) {
		xdfree(xae->function);
	}
}
开发者ID:f304646673,项目名称:PhpDebugger,代码行数:10,代码来源:xdebug_profiler.c

示例6: xdebug_hash_eval_info_dtor

void xdebug_hash_eval_info_dtor(xdebug_eval_info *ei)
{
	ei->refcount--;

	if (ei->refcount == 0) {
		xdfree(ei->contents);
		xdfree(ei);
	} else {
		/* refcount wasn't 0 yet, so we won't free it yet */
	}
}
开发者ID:Jan-E,项目名称:xdebug,代码行数:11,代码来源:xdebug_handlers.c

示例7: xdebug_xml_attribute_dtor

static void xdebug_xml_attribute_dtor(xdebug_xml_attribute *attr) {
  if (attr->next) {
    xdebug_xml_attribute_dtor(attr->next);
  }
  if (attr->free_name) {
    xdfree(attr->name);
  }
  if (attr->free_value) {
    xdfree(attr->value);
  }
  xdfree(attr);
}
开发者ID:craigcarnell,项目名称:hhvm,代码行数:12,代码来源:xdebug_xml.cpp

示例8: xdebug_profile_call_entry_dtor

void xdebug_profile_call_entry_dtor(void *dummy, void *elem)
{
	xdebug_call_entry *ce = elem;

	if (ce->function) {
		xdfree(ce->function);
	}
	if (ce->filename) {
		xdfree(ce->filename);
	}
	xdfree(ce);
}
开发者ID:f304646673,项目名称:PhpDebugger,代码行数:12,代码来源:xdebug_profiler.c

示例9: xdebug_log_stack

void xdebug_log_stack(const char *error_type_str, char *buffer, const char *error_filename, const int error_lineno TSRMLS_DC)
{
    xdebug_llist_element *le;
    function_stack_entry *i;
    char                 *tmp_log_message;

    tmp_log_message = xdebug_sprintf( "PHP %s:  %s in %s on line %d", error_type_str, buffer, error_filename, error_lineno);
    php_log_err(tmp_log_message TSRMLS_CC);
    xdfree(tmp_log_message);

    if (XG(stack) && XG(stack)->size) {
        php_log_err("PHP Stack trace:" TSRMLS_CC);

        for (le = XDEBUG_LLIST_HEAD(XG(stack)); le != NULL; le = XDEBUG_LLIST_NEXT(le))
        {
            int c = 0; /* Comma flag */
            unsigned int j = 0; /* Counter */
            char *tmp_name;
            xdebug_str log_buffer = {0, 0, NULL};

            i = XDEBUG_LLIST_VALP(le);
            tmp_name = xdebug_show_fname(i->function, 0, 0 TSRMLS_CC);
            xdebug_str_add(&log_buffer, xdebug_sprintf("PHP %3d. %s(", i->level, tmp_name), 1);
            xdfree(tmp_name);

            /* Printing vars */
            for (j = 0; j < i->varc; j++) {
                char *tmp_varname, *tmp_value;

                if (c) {
                    xdebug_str_addl(&log_buffer, ", ", 2, 0);
                } else {
                    c = 1;
                }
                tmp_varname = i->var[j].name ? xdebug_sprintf("$%s = ", i->var[j].name) : xdstrdup("");
                xdebug_str_add(&log_buffer, tmp_varname, 0);
                xdfree(tmp_varname);

                if (i->var[j].addr) {
                    tmp_value = xdebug_get_zval_value(i->var[j].addr, 0, NULL);
                    xdebug_str_add(&log_buffer, tmp_value, 0);
                    xdfree(tmp_value);
                } else {
                    xdebug_str_addl(&log_buffer, "*uninitialized*", 15, 0);
                }
            }

            xdebug_str_add(&log_buffer, xdebug_sprintf(") %s:%d", i->filename, i->lineno), 1);
            php_log_err(log_buffer.d TSRMLS_CC);
            xdebug_str_free(&log_buffer);
        }
    }
}
开发者ID:smoothify-packages,项目名称:php53-xdebug,代码行数:53,代码来源:xdebug_stack.c

示例10: xdebug_get_value_xml_node

xdebug_xml_node* xdebug_get_value_xml_node(const char* name,
                                           const Variant& val,
                                           XDebugVarType type
                                            /* = XDebugVarType::Normal */,
                                           XDebugExporter& exporter) {
  // Compute the short and full name of the passed value
  char* short_name = nullptr;
  char* full_name = nullptr;
  if (name) {
    switch (type) {
      case XDebugVarType::Normal: {
        char* tmp_name = prepare_variable_name(name);
        short_name = xdstrdup(tmp_name);
        full_name = xdstrdup(tmp_name);
        xdfree(tmp_name);
        break;
      }
      case XDebugVarType::Static:
        short_name = xdebug_sprintf("::%s", name);
        full_name =  xdebug_sprintf("::%s", name);
        break;
      case XDebugVarType::Constant:
        short_name = xdstrdup(name);
        full_name =  xdstrdup(name);
        break;
      default:
        throw Exception("Invalid variable type");
    }
  }

  // Recursively construct the xml
  return xdebug_var_export_xml_node(short_name, full_name, nullptr,
                                    val, exporter);
}
开发者ID:Ruwan-Ranganath,项目名称:hhvm,代码行数:34,代码来源:xdebug_var.cpp

示例11: xdebug_append_error_description

void xdebug_append_error_description(xdebug_str *str, int html, const char *error_type_str, char *buffer, const char *error_filename, const int error_lineno TSRMLS_DC)
{
	char **formats = select_formats(html TSRMLS_CC);
	char *escaped;
#if PHP_VERSION_ID >= 50400
	size_t newlen;
#else
	int    newlen;
#endif

	if (html) {
		escaped = php_escape_html_entities_ex(buffer, strlen(buffer), &newlen, 0, 0, NULL, 1 TSRMLS_CC);
	} else {
		escaped = estrdup(buffer);
	}

	if (strlen(XG(file_link_format)) > 0 && html) {
		char *file_link;

		create_file_link(&file_link, error_filename, error_lineno TSRMLS_CC);
		xdebug_str_add(str, xdebug_sprintf(formats[11], error_type_str, escaped, file_link, error_filename, error_lineno), 1);
		xdfree(file_link);
	} else {
		xdebug_str_add(str, xdebug_sprintf(formats[1], error_type_str, escaped, error_filename, error_lineno), 1);
	}

	efree(escaped);
}
开发者ID:bjori,项目名称:xdebug,代码行数:28,代码来源:xdebug_stack.c

示例12: xdebug_brk_info_dtor

void xdebug_brk_info_dtor(xdebug_brk_info *brk_info)
{
	if (brk_info->classname) {
		xdfree(brk_info->classname);
	}
	if (brk_info->functionname) {
		xdfree(brk_info->functionname);
	}
	if (brk_info->file) {
		xdfree(brk_info->file);
	}
	if (brk_info->condition) {
		xdfree(brk_info->condition);
	}
	xdfree(brk_info);
}
开发者ID:xdebug,项目名称:xdebug,代码行数:16,代码来源:xdebug_handlers.c

示例13: xdstrdup

char *xdebug_sprintf(const char* fmt, ...)
{
	char   *new_str;
	int     size = 1;
	va_list args;
	char   *orig_locale;

	orig_locale = xdstrdup(setlocale(LC_ALL, NULL));
	setlocale(LC_ALL, "C");
	new_str = (char *) xdmalloc(size);

	for (;;) {
		int n;

		va_start(args, fmt);
		n = vsnprintf(new_str, size, fmt, args);
		va_end(args);

		if (n > -1 && n < size) {
			break;
		}
		if (n < 0) {
			size *= 2;
		} else {
			size = n + 1;
		}
		new_str = (char *) xdrealloc(new_str, size);
	}
	setlocale(LC_ALL, orig_locale);
	xdfree(orig_locale);

	return new_str;
}
开发者ID:AbdiEffendi,项目名称:xdebug,代码行数:33,代码来源:xdebug_str.c

示例14: xdebug_path_info_dtor

void xdebug_path_info_dtor(xdebug_path_info *path_info)
{
	unsigned int i;

	for (i = 0; i < path_info->paths_count; i++) {
		xdebug_path_free(path_info->paths[i]);
	}
	xdfree(path_info->paths);
	path_info->paths = NULL;
	if (path_info->path_hash) {
		xdebug_hash_destroy(path_info->path_hash);
		path_info->path_hash = NULL;
	}
	
	xdfree(path_info);
}
开发者ID:xdebug,项目名称:xdebug,代码行数:16,代码来源:xdebug_branch_info.c

示例15: xdebug_xml_node_dtor

void xdebug_xml_node_dtor(xdebug_xml_node* xml) {
  if (xml->next) {
    xdebug_xml_node_dtor(xml->next);
  }
  if (xml->child) {
    xdebug_xml_node_dtor(xml->child);
  }
  if (xml->attribute) {
    xdebug_xml_attribute_dtor(xml->attribute);
  }
  if (xml->free_tag) {
    xdfree(xml->tag);
  }
  if (xml->text) {
    xdebug_xml_text_node_dtor(xml->text);
  }
  xdfree(xml);
}
开发者ID:craigcarnell,项目名称:hhvm,代码行数:18,代码来源:xdebug_xml.cpp


注:本文中的xdfree函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。