您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DBG_RETURN函数代码示例

51自学网 2021-06-01 20:18:21
  C++
这篇教程C++ DBG_RETURN函数代码示例写得很实用,希望能帮到您。

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

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

示例1: mysqlnd_set_sock_keepalive

/* {{{ mysqlnd_set_sock_keepalive */static intmysqlnd_set_sock_keepalive(php_stream * stream){	int socketd = ((php_netstream_data_t*)stream->abstract)->socket;	int ret = SUCCESS;	int flag = 1;	int result = setsockopt(socketd, SOL_SOCKET, SO_KEEPALIVE, (char *) &flag, sizeof(int));	DBG_ENTER("mysqlnd_set_sock_keepalive");	if (result == -1) {		ret = FAILURE;	}	DBG_RETURN(ret);}
开发者ID:PeeHaa,项目名称:php-src,代码行数:18,


示例2: mysqlnd_com_handshake_run_command

/* {{{ mysqlnd_com_handshake_run_command */static enum_func_statusmysqlnd_com_handshake_run_command(va_list args){	struct st_mysqlnd_protocol_com_handshake_command command;	enum_func_status ret;	DBG_ENTER("mysqlnd_com_handshake_run_command");	command.context.conn = va_arg(args, MYSQLND_CONN_DATA *);	command.context.user = *va_arg(args, const MYSQLND_CSTRING *);	command.context.passwd = *va_arg(args, const MYSQLND_CSTRING *);	command.context.database = *va_arg(args, const MYSQLND_CSTRING *);	command.context.client_flags = va_arg(args, size_t);	ret = mysqlnd_com_handshake_run(&command);	DBG_RETURN(ret);}
开发者ID:AllenJB,项目名称:php-src,代码行数:18,


示例3: mysqlnd_set_sock_no_delay

/* {{{ mysqlnd_set_sock_no_delay */static intmysqlnd_set_sock_no_delay(php_stream * stream){	int socketd = ((php_netstream_data_t*)stream->abstract)->socket;	int ret = SUCCESS;	int flag = 1;	int result = setsockopt(socketd, IPPROTO_TCP,  TCP_NODELAY, (char *) &flag, sizeof(int));	DBG_ENTER("mysqlnd_set_sock_no_delay");	if (result == -1) {		ret = FAILURE;	}	DBG_RETURN(ret);}
开发者ID:PeeHaa,项目名称:php-src,代码行数:18,


示例4: mysqlnd_com_change_user_create_command

/* {{{ mysqlnd_com_change_user_create_command */static struct st_mysqlnd_protocol_command *mysqlnd_com_change_user_create_command(va_list args){	struct st_mysqlnd_protocol_com_change_user_command * command;	DBG_ENTER("mysqlnd_com_change_user_create_command");	command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_com_change_user_command));	if (command) {		command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);		command->context.payload = va_arg(args, MYSQLND_CSTRING);		command->context.silent = va_arg(args, unsigned int);		command->parent.free_command = mysqlnd_com_no_params_free_command;		command->parent.run = mysqlnd_com_change_user_run;	}	DBG_RETURN((struct st_mysqlnd_protocol_command *) command);}
开发者ID:Distrotech,项目名称:php-src,代码行数:18,


示例5: MYSQLND_METHOD

/* {{{ mysqlnd_net::init */static enum_func_statusMYSQLND_METHOD(mysqlnd_net, init)(MYSQLND_NET * const net, MYSQLND_STATS * const stats, MYSQLND_ERROR_INFO * const error_info){	unsigned int buf_size;	DBG_ENTER("mysqlnd_net::init");	buf_size = MYSQLND_G(net_cmd_buffer_size); /* this is long, cast to unsigned int*/	net->data->m.set_client_option(net, MYSQLND_OPT_NET_CMD_BUFFER_SIZE, (char *) &buf_size);	buf_size = MYSQLND_G(net_read_buffer_size); /* this is long, cast to unsigned int*/	net->data->m.set_client_option(net, MYSQLND_OPT_NET_READ_BUFFER_SIZE, (char *)&buf_size);	buf_size = MYSQLND_G(net_read_timeout); /* this is long, cast to unsigned int*/	net->data->m.set_client_option(net, MYSQL_OPT_READ_TIMEOUT, (char *)&buf_size);	DBG_RETURN(PASS);}
开发者ID:PeeHaa,项目名称:php-src,代码行数:18,


示例6: mysqlnd_com_process_kill_create_command

/* {{{ mysqlnd_com_process_kill_create_command */static struct st_mysqlnd_protocol_command *mysqlnd_com_process_kill_create_command(va_list args){	struct st_mysqlnd_protocol_com_process_kill_command * command;	DBG_ENTER("mysqlnd_com_process_kill_create_command");	command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_com_process_kill_command));	if (command) {		command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);		command->context.process_id = va_arg(args, unsigned int);		command->context.read_response = va_arg(args, unsigned int)? TRUE:FALSE;		command->parent.free_command = mysqlnd_com_no_params_free_command;		command->parent.run = mysqlnd_com_process_kill_run;	}	DBG_RETURN((struct st_mysqlnd_protocol_command *) command);}
开发者ID:Distrotech,项目名称:php-src,代码行数:18,


示例7: MYSQLND_METHOD

/* {{{ mysqlnd_vio::consume_uneaten_data */size_tMYSQLND_METHOD(mysqlnd_vio, consume_uneaten_data)(MYSQLND_VIO * const net, enum php_mysqlnd_server_command cmd){#ifdef MYSQLND_DO_WIRE_CHECK_BEFORE_COMMAND	/*	  Switch to non-blocking mode and try to consume something from	  the line, if possible, then continue. This saves us from looking for	  the actual place where out-of-order packets have been sent.	  If someone is completely sure that everything is fine, he can switch it	  off.	*/	char tmp_buf[256];	size_t skipped_bytes = 0;	int opt = PHP_STREAM_OPTION_BLOCKING;	php_stream * net_stream = net->data->get_stream(net);	int was_blocked = net_stream->ops->set_option(net_stream, opt, 0, NULL);	DBG_ENTER("mysqlnd_vio::consume_uneaten_data");	if (PHP_STREAM_OPTION_RETURN_ERR != was_blocked) {		/* Do a read of 1 byte */		int bytes_consumed;		do {			skipped_bytes += (bytes_consumed = php_stream_read(net_stream, tmp_buf, sizeof(tmp_buf)));		} while (bytes_consumed == sizeof(tmp_buf));		if (was_blocked) {			net_stream->ops->set_option(net_stream, opt, 1, NULL);		}		if (bytes_consumed) {			DBG_ERR_FMT("Skipped %u bytes. Last command hasn't consumed all the output from the server",						bytes_consumed, mysqlnd_command_to_text[net->last_command]);			php_error_docref(NULL, E_WARNING, "Skipped %u bytes. Last command %s hasn't "							 "consumed all the output from the server",							 bytes_consumed, mysqlnd_command_to_text[net->last_command]);		}	}	net->last_command = cmd;	DBG_RETURN(skipped_bytes);#else	return 0;#endif}
开发者ID:KonstantinKuklin,项目名称:php-src,代码行数:47,


示例8: mysqlnd_local_infile_read

/* {{{ mysqlnd_local_infile_read */staticint mysqlnd_local_infile_read(void * ptr, zend_uchar * buf, unsigned int buf_len){	MYSQLND_INFILE_INFO	*info = (MYSQLND_INFILE_INFO *)ptr;	int count;	DBG_ENTER("mysqlnd_local_infile_read");	count = (int) php_stream_read(info->fd, (char *) buf, buf_len);	if (count < 0) {		strcpy(info->error_msg, "Error reading file");		info->error_no = CR_UNKNOWN_ERROR;	}	DBG_RETURN(count);}
开发者ID:Distrotech,项目名称:php-src,代码行数:18,


示例9: mysqlnd_com_enable_ssl_create_command

/* {{{ mysqlnd_com_enable_ssl_create_command */static struct st_mysqlnd_protocol_command *mysqlnd_com_enable_ssl_create_command(va_list args){	struct st_mysqlnd_protocol_com_enable_ssl_command * command;	DBG_ENTER("mysqlnd_com_enable_ssl_create_command");	command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_com_enable_ssl_command));	if (command) {		command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);		command->context.client_capabilities = va_arg(args, size_t);		command->context.server_capabilities = va_arg(args, size_t);		command->context.charset_no = va_arg(args, unsigned int);		command->parent.free_command = mysqlnd_com_no_params_free_command;		command->parent.run = mysqlnd_com_enable_ssl_run;	}	DBG_RETURN((struct st_mysqlnd_protocol_command *) command);}
开发者ID:Distrotech,项目名称:php-src,代码行数:19,


示例10: MYSQLND_METHOD

/* {{{ mysqlnd_command::stmt_fetch */static enum_func_statusMYSQLND_METHOD(mysqlnd_command, stmt_fetch)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING payload){	func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command;	enum_func_status ret = FAIL;	DBG_ENTER("mysqlnd_command::stmt_fetch");	ret = send_command(conn->payload_decoder_factory, COM_STMT_FETCH, (const zend_uchar*) payload.s, payload.l, FALSE,					   &conn->state,					   conn->error_info,					   conn->upsert_status,					   conn->stats,					   conn->m->send_close,					   conn);	DBG_RETURN(ret);}
开发者ID:IMSoP,项目名称:php-src,代码行数:19,


示例11: mysqlnd_com_init_db_run

/* {{{ mysqlnd_com_init_db_run */static enum_func_statusmysqlnd_com_init_db_run(void *cmd){	struct st_mysqlnd_protocol_com_init_db_command * command = (struct st_mysqlnd_protocol_com_init_db_command *) cmd;	enum_func_status ret = FAIL;	MYSQLND_CONN_DATA * conn = command->context.conn;	const MYSQLND_CSTRING db = command->context.db;	func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command;	func_mysqlnd_protocol_payload_decoder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_factory->m.send_command_handle_response;	DBG_ENTER("mysqlnd_com_init_db_run");	ret = send_command(conn->payload_decoder_factory, COM_INIT_DB, (zend_uchar*) command->context.db.s, command->context.db.l, FALSE,					   &conn->state,					   conn->error_info,					   conn->upsert_status,					   conn->stats,					   conn->m->send_close,					   conn);	if (PASS == ret) {		ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_INIT_DB, TRUE,										   conn->error_info, conn->upsert_status, &conn->last_message, conn->persistent);	}	/*	  The server sends 0 but libmysql doesn't read it and has established	  a protocol of giving back -1. Thus we have to follow it :(	*/	UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status);	if (ret == PASS) {		if (conn->connect_or_select_db.s) {			mnd_pefree(conn->connect_or_select_db.s, conn->persistent);		}		conn->connect_or_select_db.s = mnd_pestrndup(db.s, db.l, conn->persistent);		conn->connect_or_select_db.l = db.l;		if (!conn->connect_or_select_db.s) {			/* OOM */			SET_OOM_ERROR(conn->error_info);			ret = FAIL;		}	}	DBG_RETURN(ret);}
开发者ID:Distrotech,项目名称:php-src,代码行数:45,


示例12: mysqlnd_mempool_create

/* {{{ mysqlnd_mempool_create */PHPAPI MYSQLND_MEMORY_POOL *mysqlnd_mempool_create(size_t arena_size){	/* We calloc, because we free(). We don't mnd_calloc()  for a reason. */	MYSQLND_MEMORY_POOL * ret = mnd_ecalloc(1, sizeof(MYSQLND_MEMORY_POOL));	DBG_ENTER("mysqlnd_mempool_create");	if (ret) {		ret->get_chunk = mysqlnd_mempool_get_chunk;		ret->free_size = ret->arena_size = arena_size ? arena_size : 0;		ret->refcount = 0;		/* OOM ? */		ret->arena = mnd_emalloc(ret->arena_size);		if (!ret->arena) {			mysqlnd_mempool_destroy(ret);			ret = NULL;		}	}	DBG_RETURN(ret);}
开发者ID:CooCoooo,项目名称:php-src,代码行数:20,


示例13: mysqlnd_com_handshake_create_command

/* {{{ mysqlnd_com_handshake_create_command */static struct st_mysqlnd_protocol_command *mysqlnd_com_handshake_create_command(va_list args){	struct st_mysqlnd_protocol_com_handshake_command * command;	DBG_ENTER("mysqlnd_com_handshake_create_command");	command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_com_handshake_command));	if (command) {		command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);		command->context.user = *va_arg(args, const MYSQLND_CSTRING *);		command->context.passwd = *va_arg(args, const MYSQLND_CSTRING *);		command->context.database = *va_arg(args, const MYSQLND_CSTRING *);		command->context.client_flags = va_arg(args, size_t);		command->parent.free_command = mysqlnd_com_no_params_free_command;		command->parent.run = mysqlnd_com_handshake_run;	}	DBG_RETURN((struct st_mysqlnd_protocol_command *) command);}
开发者ID:Distrotech,项目名称:php-src,代码行数:20,


示例14: mysqlnd_com_quit_run

/* {{{ mysqlnd_com_quit_run */enum_func_statusmysqlnd_com_quit_run(void *cmd){	struct st_mysqlnd_protocol_com_quit_command * command = (struct st_mysqlnd_protocol_com_quit_command *) cmd;	enum_func_status ret = FAIL;	MYSQLND_CONN_DATA * conn = command->context.conn;	func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command;	DBG_ENTER("mysqlnd_com_quit_run");	ret = send_command(conn->payload_decoder_factory, COM_QUIT, NULL, 0, TRUE,					   &conn->state,					   conn->error_info,					   conn->upsert_status,					   conn->stats,					   conn->m->send_close,					   conn);	DBG_RETURN(ret);}
开发者ID:Distrotech,项目名称:php-src,代码行数:21,


示例15: mysqlnd_com_stmt_fetch_run

/* {{{ mysqlnd_com_stmt_fetch_run */static enum_func_statusmysqlnd_com_stmt_fetch_run(void *cmd){	struct st_mysqlnd_protocol_com_stmt_fetch_command * command = (struct st_mysqlnd_protocol_com_stmt_fetch_command *) cmd;	enum_func_status ret = FAIL;	MYSQLND_CONN_DATA * conn = command->context.conn;	func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command;	DBG_ENTER("mysqlnd_com_stmt_fetch_run");	ret = send_command(conn->payload_decoder_factory, COM_STMT_FETCH, (zend_uchar*) command->context.payload.s, command->context.payload.l, FALSE,					   &conn->state,					   conn->error_info,					   conn->upsert_status,					   conn->stats,					   conn->m->send_close,					   conn);	DBG_RETURN(ret);}
开发者ID:Distrotech,项目名称:php-src,代码行数:21,


示例16: mysqlnd_mempool_resize_chunk

/* {{{ mysqlnd_mempool_resize_chunk */static void *mysqlnd_mempool_resize_chunk(MYSQLND_MEMORY_POOL * pool, void * ptr, size_t old_size, size_t size){	DBG_ENTER("mysqlnd_mempool_resize_chunk");	/* Try to back-off and guess if this is the last block allocated */	if (ptr == pool->last	  && (ZEND_MM_ALIGNED_SIZE(size) <= ((char*)pool->arena->end - (char*)ptr))) {		/*			This was the last allocation. Lucky us, we can free			a bit of memory from the pool. Next time we will return from the same ptr.		*/		pool->arena->ptr = (char*)ptr + ZEND_MM_ALIGNED_SIZE(size);	} else {		void *new_ptr = mysqlnd_arena_alloc(&pool->arena, size);		memcpy(new_ptr, ptr, MIN(old_size, size));		pool->last = ptr = new_ptr;	}	DBG_RETURN(ptr);}
开发者ID:IMSoP,项目名称:php-src,代码行数:21,


示例17: DBG_PRINT

//-------------------------------------------------//删除链表,释放链表空间//-------------------------------------------------INT32 CInvHead::DelList(){	DBG_PRINT(("进入DelList函数"));	DBG_ENTER("CInvHead::DelList");	CInvDet *p = pHead;	CInvDet *s;		while (p)	{		DBG_PRINT(("delete CInvDet: DP_NO = %s!", p->m_spbm.c_str()));		s = p;		p = p->pNext;		//delete s;		s->FreeInvDet();//释放该节点所占空间	}	pHead = NULL;	pEnd = NULL;		DBG_PRINT(("退出DelList函数"));    DBG_RETURN(SUCCESS);}
开发者ID:haosir7,项目名称:MID_FWSK_1.0000,代码行数:24,


示例18: mysqlnd_switch_to_ssl_if_needed

/* {{{ mysqlnd_switch_to_ssl_if_needed */static enum_func_statusmysqlnd_switch_to_ssl_if_needed(MYSQLND_CONN_DATA * conn,								unsigned int charset_no,								size_t server_capabilities,								const MYSQLND_SESSION_OPTIONS * const session_options,								zend_ulong mysql_flags){	enum_func_status ret = FAIL;	const MYSQLND_CHARSET * charset;	DBG_ENTER("mysqlnd_switch_to_ssl_if_needed");	if (session_options->charset_name && (charset = mysqlnd_find_charset_name(session_options->charset_name))) {		charset_no	= charset->nr;	}	{		size_t client_capabilities = mysql_flags;		ret = conn->run_command(COM_ENABLE_SSL, conn, client_capabilities, server_capabilities, charset_no);	}	DBG_RETURN(ret);}
开发者ID:dzuelke,项目名称:php-src,代码行数:22,


示例19: MYSQLND_METHOD

/* {{{ mysqlnd_vio::get_open_stream */static func_mysqlnd_vio__open_streamMYSQLND_METHOD(mysqlnd_vio, get_open_stream)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme,											 MYSQLND_ERROR_INFO * const error_info){	func_mysqlnd_vio__open_stream ret = NULL;	DBG_ENTER("mysqlnd_vio::get_open_stream");	if (scheme.l > (sizeof("pipe://") - 1) && !memcmp(scheme.s, "pipe://", sizeof("pipe://") - 1)) {		ret = vio->data->m.open_pipe;	} else if ((scheme.l > (sizeof("tcp://") - 1) && !memcmp(scheme.s, "tcp://", sizeof("tcp://") - 1))				||				(scheme.l > (sizeof("unix://") - 1) && !memcmp(scheme.s, "unix://", sizeof("unix://") - 1)))	{		ret = vio->data->m.open_tcp_or_unix;	}	if (!ret) {		SET_CLIENT_ERROR(error_info, CR_CONNECTION_ERROR, UNKNOWN_SQLSTATE, "No handler for this scheme");	}	DBG_RETURN(ret);}
开发者ID:MajorDeng,项目名称:php-src,代码行数:22,


示例20: mysqlnd_com_stmt_close_run

/* {{{ mysqlnd_com_stmt_close_run */static enum_func_statusmysqlnd_com_stmt_close_run(void *cmd){	zend_uchar cmd_buf[MYSQLND_STMT_ID_LENGTH /* statement id */];	struct st_mysqlnd_protocol_com_stmt_close_command * command = (struct st_mysqlnd_protocol_com_stmt_close_command *) cmd;	enum_func_status ret = FAIL;	MYSQLND_CONN_DATA * conn = command->context.conn;	func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command;	DBG_ENTER("mysqlnd_com_stmt_close_run");	int4store(cmd_buf, command->context.stmt_id);	ret = send_command(conn->payload_decoder_factory, COM_STMT_CLOSE, cmd_buf, sizeof(cmd_buf), FALSE,					   &conn->state,					   conn->error_info,					   conn->upsert_status,					   conn->stats,					   conn->m->send_close,					   conn);	DBG_RETURN(ret);}
开发者ID:Distrotech,项目名称:php-src,代码行数:23,


示例21: mysqlnd_com_process_kill_run

/* {{{ mysqlnd_com_process_kill_run */enum_func_statusmysqlnd_com_process_kill_run(void *cmd){	struct st_mysqlnd_protocol_com_process_kill_command * command = (struct st_mysqlnd_protocol_com_process_kill_command *) cmd;	zend_uchar buff[4];	enum_func_status ret = FAIL;	MYSQLND_CONN_DATA * conn = command->context.conn;	zend_bool read_response = command->context.read_response;	func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command;	func_mysqlnd_protocol_payload_decoder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_factory->m.send_command_handle_response;	DBG_ENTER("mysqlnd_com_process_kill_run");	int4store(buff, command->context.process_id);	ret = send_command(conn->payload_decoder_factory, COM_PROCESS_KILL, buff, 4, FALSE,					   &conn->state,					   conn->error_info,					   conn->upsert_status,					   conn->stats,					   conn->m->send_close,					   conn);	if (PASS == ret && read_response) {		ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_PROCESS_KILL, TRUE,										   conn->error_info, conn->upsert_status, &conn->last_message, conn->persistent);	}	if (read_response) {		/*		  The server sends 0 but libmysql doesn't read it and has established		  a protocol of giving back -1. Thus we have to follow it :(		*/		UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status);	} else if (PASS == ret) {		SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT);		conn->m->send_close(conn);	}	DBG_RETURN(ret);}
开发者ID:Distrotech,项目名称:php-src,代码行数:40,



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


C++ DBG_RTF函数代码示例
C++ DBG_PRT函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。