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

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

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

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

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

示例1: updatePMLEFieldUtilEx

void updatePMLEFieldUtilEx(int xStart, int xEnd, int yStart, int yEnd, int zStart, int zEnd, int xBound, int yBound, int zBound, pmlConstStruct cx[], pmlConstStruct cy[], pmlConstStruct cz[], int n){			int i, j, k; // These are the indexes	int x,y,z;// There are indexes for the pmlConstStruct indexs	long p;	int m;	double dxStore;	double eps;	for (i=xStart;i<xEnd+1;i++){		x = abs(xBound - i)%PML_LAYERS;		for (j=yStart;j<yEnd+1;j++){		y = abs(yBound - j)%PML_LAYERS;		for (k=zStart;k<zEnd+1;k++){		z = abs(zBound - k)%PML_LAYERS;				p = PMLINDEX(i,j,k);		dxStore = DX(p);								m = MATERIALINDEX(i,j,k);		eps = EPSR(m)*EPSNOT;		DX(p)     = cy[y].c1*DX(p) + cy[y].c2*(HZ(i,j,k) - HZ(i,j-1,k) - HY(i,j,k) + HY(i,j,k-1) - JSX(m));		EX(i,j,k) = cz[z].c3*EX(i,j,k) + cz[z].c4*(cx[x].c5*DX(p)-cx[x].c6*dxStore)/eps; 		 	}}} // end for}// end updatePMLEFieldUtilEx
开发者ID:vbora,项目名称:FDTD,代码行数:26,


示例2: ZEND_NAMED_FUNCTION

static ZEND_NAMED_FUNCTION(zend_closure_internal_handler) /* {{{ */{	zend_closure *closure = (zend_closure*)ZEND_CLOSURE_OBJECT(EX(func));	closure->orig_internal_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU);	OBJ_RELEASE((zend_object*)closure);	EX(func) = NULL;}
开发者ID:Mingyangzu,项目名称:php-src,代码行数:7,


示例3: updatePMLHFieldUtilHz

void updatePMLHFieldUtilHz(int xStart, int xEnd, int yStart, int yEnd, int zStart, int zEnd, int xBound, int yBound, int zBound, pmlConstStruct cx[], pmlConstStruct cy[], pmlConstStruct cz[], int n){			int i, j, k; // These are the indexes	int x,y,z;// There are indexes for the pmlConstStruct indexs	long p;	int m;	double bzStore;	double mu;// Either this, or make cOnes a bigger array with number of elements which are the max of xLen, yLen, zLen	for (i=xStart;i<xEnd+1;i++){		x = abs(xBound - i)%PML_LAYERS;		for (j=yStart;j<yEnd+1;j++){		y = abs(yBound - j)%PML_LAYERS;			for (k=zStart;k<zEnd+1;k++){		z = abs(zBound - k)%PML_LAYERS;					p = PMLINDEX(i,j,k);		bzStore = BZ(p);			mu = MUR(m)*MUNOT;						BZ(p)     = cx[x].c1*BZ(p) + cx[x].c2*(EX(i,j+1,k) - EX(i,j,k) + EY(i,j,k) - EY(i+1,j,k) - MSZ(m));		HZ(i,j,k) = cy[y].c3*HZ(i,j,k) + cy[y].c4*(cz[z].c5*BZ(p)-cz[z].c6*bzStore)/mu; 	}}} // end for}// end updatePMLHFieldUtilHz
开发者ID:vbora,项目名称:FDTD,代码行数:26,


示例4: zend_closure_internal_handler

static void zend_closure_internal_handler(INTERNAL_FUNCTION_PARAMETERS) /* {{{ */{	zend_closure *closure = (zend_closure*)EX(func)->common.prototype;	closure->orig_internal_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU);	OBJ_RELEASE((zend_object*)closure);	EX(func) = NULL;}
开发者ID:Jyhwenchai,项目名称:Share,代码行数:7,


示例5: php_memoize_return

/* {{{ */static int php_memoize_return(zend_execute_data *execute_data) {	zend_long ttl = 0;	const zend_function *fbc = EX(func);	if (MG(ini.enabled) && php_memoize_is_memoizing(fbc, &ttl)) {		zend_string *key = php_memoize_key(			&EX(This),			fbc, EX_NUM_ARGS(), EX_VAR_NUM(0));		if (key) {			zval *return_value;			if (EX(opline)->op1_type & IS_CONST) {				return_value = EX_CONSTANT(EX(opline)->op1);			} else {				return_value = EX_VAR(EX(opline)->op1.var);			}			apc_cache_store(php_memoize_cache, key, return_value, ttl, 1);			if (EG(exception)) {				zend_clear_exception();			}			zend_string_release(key);		}	}		if (zend_return_function) {		return zend_return_function(execute_data);	}	return ZEND_USER_OPCODE_DISPATCH;} /* }}} */
开发者ID:krakjoe,项目名称:memoize,代码行数:35,


示例6: php_memoize_is_memoized

/* {{{ */static inline zend_bool php_memoize_is_memoized(const zend_execute_data *execute_data) {	const zend_execute_data *call = EX(call);	const zend_function *fbc = call->func;	if (call && php_memoize_is_memoizing(fbc, NULL)) {		zend_string *key = php_memoize_key(			&call->This,			fbc,			ZEND_CALL_NUM_ARGS(call), ZEND_CALL_ARG(call, 1));		zval *return_value;		if (!key) {			return 0;		}		return_value = EX_VAR(EX(opline)->result.var);		if (apc_cache_fetch(php_memoize_cache, key, php_memoize_time(), &return_value)) {			zend_string_release(key);			return 1;		}		zend_string_release(key);	}	return 0;} /* }}} */
开发者ID:krakjoe,项目名称:memoize,代码行数:28,


示例7: zend_closure_call_magic

static void zend_closure_call_magic(INTERNAL_FUNCTION_PARAMETERS) /* {{{ */ {	zend_fcall_info fci;	zend_fcall_info_cache fcc;	zval params[2];	memset(&fci, 0, sizeof(zend_fcall_info));	memset(&fci, 0, sizeof(zend_fcall_info_cache));	fci.size = sizeof(zend_fcall_info);	fci.retval = return_value;	fcc.initialized = 1;	fcc.function_handler = (zend_function *) EX(func)->common.arg_info;	fci.params = params;	fci.param_count = 2;	ZVAL_STR(&fci.params[0], EX(func)->common.function_name);	array_init(&fci.params[1]);	zend_copy_parameters_array(ZEND_NUM_ARGS(), &fci.params[1]);	fci.object = Z_OBJ(EX(This));	fcc.object = Z_OBJ(EX(This));	fcc.calling_scope = zend_get_executed_scope();	zend_call_function(&fci, &fcc);	zval_ptr_dtor(&fci.params[0]);	zval_ptr_dtor(&fci.params[1]);}
开发者ID:ChadSikorra,项目名称:php-src,代码行数:28,


示例8: free

void free(void *ptr) {	__asm	POP HL	EX (SP), IX	PCALL(FREE)	EX (SP), IX	JP (HL)	__endasm;	ptr;}
开发者ID:KnightOS,项目名称:libc,代码行数:10,


示例9: wung_execute_ex

void wung_execute_ex(wung_execute_data * execute_data) {    while(1) {        if (EX(opline)->handler==0) {            break;        }        wung_print_opline(EX(opline));        (EX(opline)->handler)(execute_data);        WUNG_NEXT_OPCODE;    }}
开发者ID:wutianfang,项目名称:wphp,代码行数:11,


示例10: ZEND_METHOD

/* {{{ proto ErrorException::__construct(string message, int code, int severity [, string filename [, int lineno [, Throwable previous]]])   ErrorException constructor */ZEND_METHOD(error_exception, __construct){	char  *message = NULL, *filename = NULL;	zend_long   code = 0, severity = E_ERROR, lineno;	zval   tmp, *object, *previous = NULL;	int    argc = ZEND_NUM_ARGS();	size_t message_len, filename_len;	if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|sllslO!", &message, &message_len, &code, &severity, &filename, &filename_len, &lineno, &previous, zend_ce_throwable) == FAILURE) {		zend_class_entry *ce;		if (Z_TYPE(EX(This)) == IS_OBJECT) {			ce = Z_OBJCE(EX(This));		} else if (Z_CE(EX(This))) {			ce = Z_CE(EX(This));		} else {			ce = zend_ce_error_exception;		}		zend_throw_error(NULL, "Wrong parameters for %s([string $message [, long $code, [ long $severity, [ string $filename, [ long $lineno  [, Throwable $previous = NULL]]]]]])", ZSTR_VAL(ce->name));		return;	}	object = getThis();	if (message) {		ZVAL_STRING(&tmp, message);		zend_update_property_ex(zend_ce_exception, object, CG(known_strings)[ZEND_STR_MESSAGE], &tmp);		zval_ptr_dtor(&tmp);	}	if (code) {		ZVAL_LONG(&tmp, code);		zend_update_property_ex(zend_ce_exception, object, CG(known_strings)[ZEND_STR_CODE], &tmp);	}	if (previous) {		zend_update_property_ex(zend_ce_exception, object, CG(known_strings)[ZEND_STR_PREVIOUS], previous);	}	ZVAL_LONG(&tmp, severity);	zend_update_property_ex(zend_ce_exception, object, CG(known_strings)[ZEND_STR_SEVERITY], &tmp);	if (argc >= 4) {		ZVAL_STRING(&tmp, filename);		zend_update_property_ex(zend_ce_exception, object, CG(known_strings)[ZEND_STR_FILE], &tmp);		zval_ptr_dtor(&tmp);    	if (argc < 5) {    	    lineno = 0; /* invalidate lineno */    	}		ZVAL_LONG(&tmp, lineno);		zend_update_property_ex(zend_ce_exception, object, CG(known_strings)[ZEND_STR_LINE], &tmp);	}}
开发者ID:dol,项目名称:php-src,代码行数:55,


示例11: pearson_distances_pairwise_complete_obs_variant

// variant: means by /nrow rather than /npairs when dealing with missing data// deviates from R's pairwise.complete.obs, but highly similar.// good results in context of particular biological validations,// but formal correctness undeterminedvoidpearson_distances_pairwise_complete_obs_variant(	double * const d,	const double * const matrix,	int const nrow,	int const ncol){	std::ptrdiff_t p(0);	t_float EX(0), EY(0), EXX(0), EYY(0), EXY(0), x(0), y(0);	for(int col1(0), end(ncol); col1<(end-1); ++col1){		for(int col2(col1+1); col2<end; ++col2){			// Pearson correlation distance			EX=0, EY=0, EXX=0, EYY=0, EXY=0, x=0, y=0;			unsigned npairs(0);			for(int row(0); row<nrow; ++row){				// R indexes its arrays BY COLUMN				x = matrix[col1*nrow+row];				y = matrix[col2*nrow+row];				if(ISNA(x) || ISNA(y)) continue;				++npairs;				EX += x;				EY += y;				EXX += x*x;				EYY += y*y;				EXY += x*y;			}			if(npairs<1) d[p++] = 2.0;			else d[p++] = 1.0 - (EXY - EX*EY/nrow) / sqrt( (EXX - EX*EX/nrow)*(EYY - EY*EY/nrow) );		}	}}
开发者ID:justinashworth,项目名称:fastcluster_mod,代码行数:35,


示例12: com_call_method

static int com_call_method(zend_string *method, zend_object *object, INTERNAL_FUNCTION_PARAMETERS){	zval *args = NULL;	php_com_dotnet_object *obj = (php_com_dotnet_object*)object;	int nargs;	VARIANT v;	int ret = FAILURE;	if (V_VT(&obj->v) != VT_DISPATCH) {		return FAILURE;	}	nargs = ZEND_NUM_ARGS();	if (nargs) {		args = (zval *)safe_emalloc(sizeof(zval), nargs, 0);		zend_get_parameters_array_ex(nargs, args);	}	VariantInit(&v);	if (SUCCESS == php_com_do_invoke_byref(obj, (zend_internal_function*)EX(func), DISPATCH_METHOD|DISPATCH_PROPERTYGET, &v, nargs, args)) {		php_com_zval_from_variant(return_value, &v, obj->code_page);		ret = SUCCESS;		VariantClear(&v);	}	if (args) {		efree(args);	}	return ret;}
开发者ID:PeeHaa,项目名称:php-src,代码行数:33,


示例13: run_pipeline

void run_pipeline() {	if(Register::cycle == 59) {            printf("in main before WB ID_EX.$rt_out = %d/n", ID_EX.$rt_out);        }	WB();	if(Register::cycle == 59) {            printf("in main before DM ID_EX.$rt_out = %d/n", ID_EX.$rt_out);        }    DM();    if(Register::cycle == 59) {            printf("in main before EX ID_EX.$rt_out = %d/n", ID_EX.$rt_out);        }    EX();    if(Register::cycle == 59) {            printf("in main before ID ID_EX.$rt_out = %d/n", ID_EX.$rt_out);        }    ID();    if(Register::cycle == 59) {            printf("in main before IF ID_EX.$rt_out = %d/n", ID_EX.$rt_out);        }    IF();    if(Register::cycle == 59) {            printf("in main after IF ID_EX.$rt_out = %d/n", ID_EX.$rt_out);        }}
开发者ID:ChunChenLin,项目名称:Archi2016_Project2,代码行数:25,


示例14: ZEND_METHOD

/* {{{ proto Closure Closure::fromCallable(callable callable)   Create a closure from a callable using the current scope. */ZEND_METHOD(Closure, fromCallable){	zval *callable;	int success;	char *error = NULL;	if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &callable) == FAILURE) {		return;	}	if (Z_TYPE_P(callable) == IS_OBJECT && instanceof_function(Z_OBJCE_P(callable), zend_ce_closure)) {		/* It's already a closure */		RETURN_ZVAL(callable, 1, 0);	}	/* create closure as if it were called from parent scope */	EG(current_execute_data) = EX(prev_execute_data);	success = zend_create_closure_from_callable(return_value, callable, &error);	EG(current_execute_data) = execute_data;	if (success == FAILURE || error) {		if (error) {			zend_throw_exception_ex(zend_ce_type_error, 0, "Failed to create closure from callable: %s", error);			efree(error);		} else {			zend_throw_exception_ex(zend_ce_type_error, 0, "Failed to create closure from callable");		}	}}
开发者ID:Mingyangzu,项目名称:php-src,代码行数:31,


示例15: srec_csum

/* * Checksum for SRECORD.  Add all the bytes from the record length field through the data, and take * the ones complement.  This includes the address field, which for SRECORDs can be 2 bytes, 3 bytes or * 4 bytes.  In this case, since the upper bytes of the address will be 0 for records of the smaller sizes, * just add all 4 bytes of the address in all cases. *  * The arguments are: *  *  buf		a pointer to the beginning of the data for the record *  length	the length of the data portion of the record *  chunk_len	the length of the record starting at the address and including the checksum *  chunk_addr	starting address for the data in the record * * Returns an unsigned char with the checksum */static unsigned char srec_csum(unsigned char *buf, unsigned int length, int chunk_len, int chunk_addr) {  int sum = chunk_len + (LO(chunk_addr)) + (HI(chunk_addr)) + (EX(chunk_addr)) + (EH(chunk_addr));  unsigned int i;  for(i = 0; i < length; i++) {    sum += buf[i];  }  return ~sum & 0xff;}
开发者ID:welash,项目名称:stm8flash,代码行数:23,


示例16: PHP_FUNCTION

static PHP_FUNCTION(com_method_handler){	zval *object = getThis();	Z_OBJ_HANDLER_P(object, call_method)(			((zend_internal_function*)EX(func))->function_name,			Z_OBJ_P(object),			INTERNAL_FUNCTION_PARAM_PASSTHRU);}
开发者ID:PeeHaa,项目名称:php-src,代码行数:9,


示例17: zend_jit_profile_helper

ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_jit_profile_helper(ZEND_OPCODE_HANDLER_ARGS){	zend_op_array *op_array = (zend_op_array*)EX(func);	zend_vm_opcode_handler_t handler = (zend_vm_opcode_handler_t)ZEND_FUNC_INFO(op_array);	uintptr_t counter = (uintptr_t)ZEND_COUNTER_INFO(op_array);	ZEND_COUNTER_INFO(op_array) = (void*)(counter + 1);	++zend_jit_profile_counter;	ZEND_OPCODE_TAIL_CALL(handler);}
开发者ID:KonstantinKuklin,项目名称:php-src,代码行数:10,


示例18: php_memoize_leave_helper

/* {{{ */static inline int php_memoize_leave_helper(zend_execute_data *execute_data) {	zend_execute_data *call = EX(call);	uint32_t info = ZEND_CALL_INFO(call);	if (info & ZEND_CALL_RELEASE_THIS) {		OBJ_RELEASE(Z_OBJ(call->This));	} else if (info & ZEND_CALL_CLOSURE) {		 OBJ_RELEASE((zend_object*)call->func->op_array.prototype);	}	EX(call) = call->prev_execute_data;	zend_vm_stack_free_args(call);	zend_vm_stack_free_call_frame(call);	EX(opline) = EX(opline) + 1;	return ZEND_USER_OPCODE_LEAVE;} /* }}} */
开发者ID:krakjoe,项目名称:memoize,代码行数:20,


示例19: calcMB

static inline void calcMB(void){  for(int i=1; i<N_PX-1; i++){    for(int j=1; j<N_PY-1; j++){      double complex nowMz = MZ(i,j);      Mz[ind(i,j)] = CMZ(i,j)*MZ(i,j) - CMZEXEY(i,j)*(EY(i+1,j) - EY(i,j) - EX(i,j+1) + EX(i,j));      Bz[ind(i,j)] = CBZ(i,j)*BZ(i,j) + CBZMZ1(i,j)*MZ(i,j) - CBZMZ0(i,j)*nowMz;     }  }}
开发者ID:rennone,项目名称:C,代码行数:10,


示例20: zend_jit_leave_top_func_helper

ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_jit_leave_top_func_helper(uint32_t call_info EXECUTE_DATA_DC){	if (UNEXPECTED(call_info & (ZEND_CALL_HAS_SYMBOL_TABLE|ZEND_CALL_FREE_EXTRA_ARGS))) {		if (UNEXPECTED(call_info & ZEND_CALL_HAS_SYMBOL_TABLE)) {			zend_clean_and_cache_symbol_table(EX(symbol_table));		}		zend_vm_stack_free_extra_args_ex(call_info, execute_data);	}	EG(current_execute_data) = EX(prev_execute_data);	if (UNEXPECTED(call_info & ZEND_CALL_CLOSURE)) {		OBJ_RELEASE(ZEND_CLOSURE_OBJECT(EX(func)));	}	execute_data = EG(current_execute_data);#ifdef HAVE_GCC_GLOBAL_REGS	opline = zend_jit_halt_op;#else	return -1; // ZEND_VM_RETURN#endif}
开发者ID:KonstantinKuklin,项目名称:php-src,代码行数:19,


示例21: coro_exit_handler

static int coro_exit_handler(zend_execute_data *execute_data){    zval ex;    zend_object *obj;    zend_long flags = 0;    if (sw_get_current_cid() != -1)    {        flags |= SW_EXIT_IN_COROUTINE;    }    if (SwooleG.serv && SwooleG.serv->gs->start)    {        flags |= SW_EXIT_IN_SERVER;    }    if (flags)    {        const zend_op *opline = EX(opline);        zval _exit_status;        zval *exit_status = NULL;        if (opline->op1_type != IS_UNUSED)        {            if (opline->op1_type == IS_CONST)            {                // see: https://github.com/php/php-src/commit/e70618aff6f447a298605d07648f2ce9e5a284f5#ifdef EX_CONSTANT                exit_status = EX_CONSTANT(opline->op1);#else                exit_status = RT_CONSTANT(opline, opline->op1);#endif            }            else            {                exit_status = EX_VAR(opline->op1.var);            }            if (Z_ISREF_P(exit_status))            {                exit_status = Z_REFVAL_P(exit_status);            }        }        else        {            exit_status = &_exit_status;            ZVAL_NULL(exit_status);        }        obj = zend_throw_error_exception(swoole_exit_exception_class_entry_ptr, "swoole exit.", 0, E_ERROR TSRMLS_CC);        ZVAL_OBJ(&ex, obj);        zend_update_property_long(swoole_exit_exception_class_entry_ptr, &ex, ZEND_STRL("flags"), flags);        Z_TRY_ADDREF_P(exit_status);        zend_update_property(swoole_exit_exception_class_entry_ptr, &ex, ZEND_STRL("status"), exit_status);    }    return ZEND_USER_OPCODE_DISPATCH;}
开发者ID:didiwuliu,项目名称:swoole-src,代码行数:53,


示例22: EX

bool Position_system::read_from_file(std::string datname){	 std::ifstream SET_TXT;  	 SET_TXT.open(datname.c_str()); 	 if(!SET_TXT) {	      throw EX("file load error",DEBUG_LOCATION,"Position_system::temp_read_laser_beam_structur(std::string& datname) -> could not load "+datname+"-> error");	      return false;	 }	 	 std::string hilf;	 int icase=0;	 int max_line = 50, iline = 0;	 //search of the beginning string	  while(getline(SET_TXT,hilf))	  {	    size_t find_0_1=0;	    find_0_1=hilf.find(m_search_string_applanix_file.c_str())+1;  //find ist ein vordefinierter Befehl in der Klasse string!            	    if(find_0_1){ icase=1; break; }	    	    size_t find_0_2=0;	    find_0_2=hilf.find(m_search_string_messpictures_file.c_str())+1;  //find ist ein vordefinierter Befehl in der Klasse string!            	    if(find_0_2){ icase=2; break; }	    	    size_t find_0_3=0;        find_0_3=hilf.find(m_search_string_temp_laser_beam_file.c_str())+1;  //find ist ein vordefinierter Befehl in der Klasse string!        if(find_0_3){ icase=3; break; }	    ++iline;	    if(iline>max_line){break;}	  }	  	  SET_TXT.close();	  SET_TXT.clear();	  	  if(icase==1)	  {		return read_applanix_file(datname);	  }	  if(icase==2)	  {		return read_messpictures_log_file(datname);	  }      if(icase==3)      {       (*this).temp_read_laser_beam_structur(datname);       return true;      }	 	  	  return false;	  }
开发者ID:trebb,项目名称:phoml,代码行数:52,


示例23: ZEND_METHOD

/* {{{ proto Exception|Error::__construct(string message, int code [, Throwable previous])   Exception constructor */ZEND_METHOD(exception, __construct){	zend_string *message = NULL;	zend_long   code = 0;	zval  tmp, *object, *previous = NULL;	zend_class_entry *base_ce;	int    argc = ZEND_NUM_ARGS();	object = getThis();	base_ce = i_get_exception_base(object);	if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|SlO!", &message, &code, &previous, zend_ce_throwable) == FAILURE) {		zend_class_entry *ce;		if (Z_TYPE(EX(This)) == IS_OBJECT) {			ce = Z_OBJCE(EX(This));		} else if (Z_CE(EX(This))) {			ce = Z_CE(EX(This));		} else {			ce = base_ce;		}		zend_throw_error(NULL, "Wrong parameters for %s([string $message [, long $code [, Throwable $previous = NULL]]])", ZSTR_VAL(ce->name));		return;	}	if (message) {		ZVAL_STR(&tmp, message);		zend_update_property_ex(base_ce, object, ZSTR_KNOWN(ZEND_STR_MESSAGE), &tmp);	}	if (code) {		ZVAL_LONG(&tmp, code);		zend_update_property_ex(base_ce, object, ZSTR_KNOWN(ZEND_STR_CODE), &tmp);	}	if (previous) {		zend_update_property_ex(base_ce, object, ZSTR_KNOWN(ZEND_STR_PREVIOUS), previous);	}}
开发者ID:WarnerBe,项目名称:php-src,代码行数:41,


示例24: oop_method_call_handler

/** see http://lxr.php.net/xref/PHP_7_0/Zend/zend_vm_def.h#2892 */static int oop_method_call_handler(zend_execute_data *execute_data){    const zend_op *opline = execute_data->opline;    zend_free_op free_op1, free_op2;    zval *obj = NULL, *method = NULL;    zend_class_entry *ce = NULL;    zend_function *fbc = NULL;    zend_execute_data *call = NULL;    obj = zend_get_zval_ptr(opline->op1_type, &opline->op1, execute_data, &free_op1, BP_VAR_R);    method = zend_get_zval_ptr(opline->op2_type, &opline->op2, execute_data, &free_op2, BP_VAR_R);    if (Z_TYPE_P(obj) == IS_STRING) {        ce = OOP_G(oop_handlers)[Z_TYPE_P(obj)];        if (!ce) {            return ZEND_USER_OPCODE_DISPATCH;        }        fbc = zend_std_get_static_method(ce, Z_STR_P(method), NULL);        if (UNEXPECTED(fbc == NULL)) {           php_error(E_ERROR, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(method));        }        fbc = oop_get_indirection_func(ce, fbc, method, obj);        call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION, fbc, opline->extended_value, ce, NULL);        call->prev_execute_data = EX(call);        EX(call) = call;        FREE_OP(free_op2);        FREE_OP_IF_VAR(free_op1);        execute_data->opline++;        return ZEND_USER_OPCODE_CONTINUE;    }    return ZEND_USER_OPCODE_DISPATCH;}
开发者ID:codebear4,项目名称:php-ext-oop,代码行数:40,


示例25: ZEND_DECLARE_INHERITED_CLASS_DELAYED_HANDLER

static int ZEND_DECLARE_INHERITED_CLASS_DELAYED_HANDLER(ZEND_OPCODE_HANDLER_ARGS){	zend_class_entry **pce, **pce_orig;	if (zend_hash_find(EG(class_table), Z_STRVAL(EX(opline)->op2.u.constant), Z_STRLEN(EX(opline)->op2.u.constant) + 1, (void **)&pce) == FAILURE ||	    (zend_hash_find(EG(class_table), Z_STRVAL(EX(opline)->op1.u.constant), Z_STRLEN(EX(opline)->op1.u.constant), (void**)&pce_orig) == SUCCESS &&	     *pce != *pce_orig)) {		do_bind_inherited_class(EX(opline), EG(class_table), EX_T(EX(opline)->extended_value).class_entry, 0 TSRMLS_CC);	}	EX(opline)++;	return ZEND_USER_OPCODE_CONTINUE;}
开发者ID:alokmenghrajani,项目名称:php-src,代码行数:12,



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


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