• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ ecl_process_env函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: si_get_limit

cl_object
si_get_limit(cl_object type)
{
	cl_env_ptr env = ecl_process_env();
	cl_index output;
	if (type == ECL_SYM("EXT::FRAME-STACK",1669)) {
		output = env->frs_size;
	} else if (type == ECL_SYM("EXT::BINDING-STACK",1668)) {
		output = env->bds_size;
	} else if (type == ECL_SYM("EXT::C-STACK",1671)) {
		output = env->cs_size;
	} else if (type == ECL_SYM("EXT::LISP-STACK",1670)) {
		output = env->stack_size;
	} else {
		output = cl_core.max_heap_size;
	}
	{
#line 633
		const cl_env_ptr the_env = ecl_process_env();
#line 633
		#line 633
		cl_object __value0 = ecl_make_unsigned_integer(output);
#line 633
		the_env->nvalues = 1;
#line 633
		return __value0;
#line 633
	}

}
开发者ID:hoobaa,项目名称:mecl,代码行数:30,代码来源:stacks.o.c


示例2: mp_get_rwlock_write_wait

cl_object
mp_get_rwlock_write_wait(cl_object lock)
{
        cl_env_ptr env = ecl_process_env();
        if (ecl_t_of(lock) != t_rwlock)
		FEerror_not_a_rwlock(lock);
#ifdef ECL_RWLOCK
        {
                int rc = pthread_rwlock_wrlock(&lock->rwlock.mutex);
                if (rc != 0) {
                        FEunknown_rwlock_error(lock, rc);
                }
                {
#line 213
	const cl_env_ptr the_env = ecl_process_env();
#line 213
	#line 213
	cl_object __value0 = ECL_T;
#line 213
	the_env->nvalues = 1;
#line 213
	return __value0;
#line 213
}

        }
#else
        return mp_get_lock_wait(lock->rwlock.mutex);
#endif
}
开发者ID:hoobaa,项目名称:mecl,代码行数:30,代码来源:rwlock.o.c


示例3: si_put_f

/*
	(SI:PUT-F plist value indicator)
	returns the new property list with value for property indicator.
	It will be used in SETF for GETF.
*/
cl_object
si_put_f(cl_object place, cl_object value, cl_object indicator)
{
	cl_object l;

#ifdef ECL_SAFE
	assert_type_proper_list(place);
#endif
	/* This loop guarantees finishing for circular lists */
	for (l = place; CONSP(l); ) {
		cl_object cdr_l = ECL_CONS_CDR(l);
		if (!CONSP(cdr_l))
			break;
		if (ECL_CONS_CAR(l) == indicator) {
			ECL_RPLACA(cdr_l, value);
			{
#line 214
				const cl_env_ptr the_env = ecl_process_env();
#line 214
				#line 214
				cl_object __value0 = place;
#line 214
				the_env->nvalues = 1;
#line 214
				return __value0;
#line 214
			}
;
		}
		l = ECL_CONS_CDR(cdr_l);
	}
	if (l != ECL_NIL)
		FEtype_error_plist(place);
	place = CONS(value, place);
	{
#line 221
		const cl_env_ptr the_env = ecl_process_env();
#line 221
		#line 221
		cl_object __value0 = CONS(indicator, place);
#line 221
		the_env->nvalues = 1;
#line 221
		return __value0;
#line 221
	}
;
}
开发者ID:hoobaa,项目名称:mecl,代码行数:53,代码来源:symbol.o.c


示例4: si_float_to_digits

cl_object
si_float_to_digits(cl_object digits, cl_object number, cl_object position,
                   cl_object relativep)
{
        cl_fixnum k;
        float_approx approx[1];
        setup(number, approx);
        change_precision(approx, position, relativep);
        k = scale(approx);
        if (Null(digits))
                digits = si_make_vector(ECL_SYM("BASE-CHAR",120), ecl_make_fixnum(10),
                                        ECL_T /* adjustable */,
                                        ecl_make_fixnum(0) /* fill pointer */,
                                        ECL_NIL /* displacement */,
                                        ECL_NIL /* displ. offset */);
        generate(digits, approx);
        {
#line 218
	const cl_env_ptr the_env = ecl_process_env();
#line 218
	#line 218
	cl_object __value0 = ecl_make_fixnum(k);
#line 218
	cl_object __value1 = digits;
#line 218
	the_env->nvalues = 2;
#line 218
	the_env->values[1] = __value1;
#line 218
	return __value0;
#line 218
}

}
开发者ID:hoobaa,项目名称:mecl,代码行数:34,代码来源:float_to_digits.o.c


示例5: si_rem_f

/*
	(SI:REM-F plist indicator) returns two values:

		* the new property list
		  in which property indcator is removed

		* T     if really removed
		  NIL   otherwise.

	It will be used for macro REMF.
*/
cl_object
si_rem_f(cl_object plist, cl_object indicator)
{
	cl_env_ptr the_env = ecl_process_env();
	bool found = remf(&plist, indicator);
	ecl_return2(the_env, plist, (found? ECL_T : ECL_NIL));
}
开发者ID:hoobaa,项目名称:mecl,代码行数:18,代码来源:symbol.o.c


示例6: init_fas_CODE

ECL_DLLEXPORT void init_fas_CODE(cl_object flag)
{
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 cl_object *VVtemp;
 if (flag != OBJNULL){
 Cblock = flag;
 #ifndef ECL_DYNAMIC_VV
 flag->cblock.data = VV;
 #endif
 flag->cblock.data_size = VM;
 flag->cblock.temp_data_size = VMtemp;
 flag->cblock.data_text = compiler_data_text;
 flag->cblock.data_text_size = compiler_data_text_size;
 flag->cblock.cfuns_size = compiler_cfuns_size;
 flag->cblock.cfuns = compiler_cfuns;
 flag->cblock.source = make_constant_base_string("/home/tucker/Repo/my-code/lisp/misc.lisp");
 return;}
 #ifdef ECL_DYNAMIC_VV
 VV = Cblock->cblock.data;
 #endif
 Cblock->cblock.data_text = "@EcLtAg:[email protected]";
 VVtemp = Cblock->cblock.temp_data;
 ECL_DEFINE_SETF_FUNCTIONS
 ecl_function_dispatch(cl_env_copy,VV[2])(10, VVtemp[0], ECL_NIL, ECL_NIL, VVtemp[1], ECL_NIL, ECL_NIL, VVtemp[2], ECL_NIL, ECL_NIL, ECL_NIL) /*  DODEFPACKAGE */;
 ecl_cmp_defun(VV[3]);                            /*  SEQ             */
 ecl_function_dispatch(cl_env_copy,VV[4])(3, VV[0], ECL_SYM("FUNCTION",396), VVtemp[3]) /*  SET-DOCUMENTATION */;
 ecl_cmp_defun(VV[8]);                            /*  INTERLEAVE      */
}
开发者ID:hitchiker42,项目名称:my-code,代码行数:29,代码来源:misc.c


示例7: cl_denominator

cl_object
cl_denominator(cl_object x)
{
	switch (ecl_t_of(x)) {
	case t_ratio:
		x = x->ratio.den;
		break;
	case t_fixnum:
	case t_bignum:
		x = ecl_make_fixnum(1);
		break;
	default:
                FEwrong_type_nth_arg(ecl_make_fixnum(/*NUMERATOR*/608),1,x,ecl_make_fixnum(/*RATIONAL*/687));
	}
	{
#line 116
		const cl_env_ptr the_env = ecl_process_env();
#line 116
		#line 116
		cl_object __value0 = x;
#line 116
		the_env->nvalues = 1;
#line 116
		return __value0;
#line 116
	}

}
开发者ID:hoobaa,项目名称:mecl,代码行数:28,代码来源:num_co.o.c


示例8: cl_copy_alist

cl_object
cl_copy_alist(cl_object x)
{
	cl_object copy;
	if (ecl_unlikely(!LISTP(x))) {
                FEwrong_type_only_arg(ecl_make_fixnum(/*COPY-ALIST*/256), x, ecl_make_fixnum(/*LIST*/481));
	}
	copy = ECL_NIL;
	if (!Null(x)) {
		cl_object tail = copy = duplicate_pairs(x);
		while (x = ECL_CONS_CDR(x), !Null(x)) {
			if (!LISTP(x)) {
				FEtype_error_list(x);
			} else {
				cl_object cons = duplicate_pairs(x);
				tail = ECL_RPLACD(tail, cons);
				tail = cons;
			}
		}
	}
	{
#line 473
		const cl_env_ptr the_env = ecl_process_env();
#line 473
		#line 473
		cl_object __value0 = copy;
#line 473
		the_env->nvalues = 1;
#line 473
		return __value0;
#line 473
	}
;
}
开发者ID:hoobaa,项目名称:mecl,代码行数:34,代码来源:list.o.c


示例9: si_foreign_data_set_elt

cl_object
si_foreign_data_set_elt(cl_object f, cl_object andx, cl_object type, cl_object value)
{
	cl_index ndx = ecl_to_size(andx);
	cl_index limit = f->foreign.size;
	enum ecl_ffi_tag tag = ecl_foreign_type_code(type);
	if (ecl_unlikely(ndx >= limit ||
                         ndx + ecl_foreign_type_table[tag].size > limit)) {
		FEerror("Out of bounds reference into foreign data type ~A.", 1, f);
	}
	if (ecl_unlikely(ecl_t_of(f) != t_foreign)) {
                FEwrong_type_nth_arg(ecl_make_fixnum(/*SI::FOREIGN-DATA-SET-ELT*/1354), 1, f,
                                     ecl_make_fixnum(/*SI::FOREIGN-DATA*/1345));
	}
	ecl_foreign_data_set_elt((void*)(f->foreign.data + ndx), tag, value);
	{
#line 655
		const cl_env_ptr the_env = ecl_process_env();
#line 655
		#line 655
		cl_object __value0 = value;
#line 655
		the_env->nvalues = 1;
#line 655
		return __value0;
#line 655
	}

}
开发者ID:hoobaa,项目名称:mecl,代码行数:29,代码来源:ffi.o.c


示例10: si_foreign_data_set

cl_object
si_foreign_data_set(cl_object f, cl_object andx, cl_object value)
{
	cl_index ndx = ecl_to_size(andx);
	cl_index size, limit;

	if (ecl_unlikely(ecl_t_of(f) != t_foreign)) {
                FEwrong_type_nth_arg(ecl_make_fixnum(/*SI::FOREIGN-DATA-SET*/1353), 1, f,
                                     ecl_make_fixnum(/*SI::FOREIGN-DATA*/1345));
	}
	if (ecl_unlikely(ecl_t_of(value) != t_foreign)) {
                FEwrong_type_nth_arg(ecl_make_fixnum(/*SI::FOREIGN-DATA-SET*/1353), 3, value,
                                     ecl_make_fixnum(/*SI::FOREIGN-DATA*/1345));
	}
	size = value->foreign.size;
	limit = f->foreign.size;
	if (ecl_unlikely(ndx >= limit || (limit - ndx) < size)) {
		FEerror("Out of bounds reference into foreign data type ~A.", 1, f);
	}
	memcpy(f->foreign.data + ndx, value->foreign.data, size);
	{
#line 397
		const cl_env_ptr the_env = ecl_process_env();
#line 397
		#line 397
		cl_object __value0 = value;
#line 397
		the_env->nvalues = 1;
#line 397
		return __value0;
#line 397
	}

}
开发者ID:hoobaa,项目名称:mecl,代码行数:34,代码来源:ffi.o.c


示例11: si_foreign_data_ref

cl_object
si_foreign_data_ref(cl_object f, cl_object andx, cl_object asize, cl_object tag)
{
	cl_index ndx = ecl_to_size(andx);
	cl_index size = ecl_to_size(asize);
	cl_object output;

	if (ecl_unlikely(ecl_t_of(f) != t_foreign)) {
                FEwrong_type_nth_arg(ecl_make_fixnum(/*SI::FOREIGN-DATA-REF*/1351), 1, f,
                                     ecl_make_fixnum(/*SI::FOREIGN-DATA*/1345));
	}
	if (ecl_unlikely(ndx >= f->foreign.size || (f->foreign.size - ndx) < size)) {
		FEerror("Out of bounds reference into foreign data type ~A.", 1, f);
	}
	output = ecl_allocate_foreign_data(tag, size);
	memcpy(output->foreign.data, f->foreign.data + ndx, size);
	{
#line 374
		const cl_env_ptr the_env = ecl_process_env();
#line 374
		#line 374
		cl_object __value0 = output;
#line 374
		the_env->nvalues = 1;
#line 374
		return __value0;
#line 374
	}

}
开发者ID:hoobaa,项目名称:mecl,代码行数:30,代码来源:ffi.o.c


示例12: si_foreign_data_pointer

cl_object
si_foreign_data_pointer(cl_object f, cl_object andx, cl_object asize,
			cl_object tag)
{
	cl_index ndx = ecl_to_size(andx);
	cl_index size = ecl_to_size(asize);
	cl_object output;

	if (ecl_unlikely(ecl_t_of(f) != t_foreign)) {
                FEwrong_type_only_arg(ecl_make_fixnum(/*SI::FOREIGN-DATA-POINTER*/1349), f,
                                      ecl_make_fixnum(/*SI::FOREIGN-DATA*/1345));
	}
	if (ecl_unlikely(ndx >= f->foreign.size || (f->foreign.size - ndx) < size)) {
		FEerror("Out of bounds reference into foreign data type ~A.", 1, f);
	}
	output = ecl_alloc_object(t_foreign);
	output->foreign.tag = tag;
	output->foreign.size = size;
	output->foreign.data = f->foreign.data + ndx;
	{
#line 355
		const cl_env_ptr the_env = ecl_process_env();
#line 355
		#line 355
		cl_object __value0 = output;
#line 355
		the_env->nvalues = 1;
#line 355
		return __value0;
#line 355
	}

}
开发者ID:hoobaa,项目名称:mecl,代码行数:33,代码来源:ffi.o.c


示例13: si_foreign_data_equal

cl_object
si_foreign_data_equal(cl_object f1, cl_object f2)
{
	if (ecl_unlikely(!ECL_FOREIGN_DATA_P(f1))) {
                FEwrong_type_only_arg(ecl_make_fixnum(/*SI::FOREIGN-DATA-ADDRESS*/1346), f1,
                                      ecl_make_fixnum(/*SI::FOREIGN-DATA*/1345));
	}
	if (ecl_unlikely(!ECL_FOREIGN_DATA_P(f2))) {
                FEwrong_type_only_arg(ecl_make_fixnum(/*SI::FOREIGN-DATA-ADDRESS*/1346), f2,
                                      ecl_make_fixnum(/*SI::FOREIGN-DATA*/1345));
	}
	{
#line 333
		const cl_env_ptr the_env = ecl_process_env();
#line 333
		#line 333
		cl_object __value0 = ((f1->foreign.data == f2->foreign.data)? ECL_T : ECL_NIL);
#line 333
		the_env->nvalues = 1;
#line 333
		return __value0;
#line 333
	}

}
开发者ID:hoobaa,项目名称:mecl,代码行数:25,代码来源:ffi.o.c


示例14: si_make_foreign_data_from_array

cl_object
si_make_foreign_data_from_array(cl_object array)
{
	cl_object tag;
	if (ecl_unlikely(ecl_t_of(array) != t_array && ecl_t_of(array) != t_vector)) {
                FEwrong_type_only_arg(ecl_make_fixnum(/*SI::MAKE-FOREIGN-DATA-FROM-ARRAY*/1358), array,
                                      ecl_make_fixnum(/*ARRAY*/96));
	}
        tag = ecl_aet_to_ffi_table[array->array.elttype];
        if (ecl_unlikely(Null(tag))) {
		FEerror("Cannot make foreign object from array "
                        "with element type ~S.", 1,
                        ecl_elttype_to_symbol(array->array.elttype));
	}
	{
#line 293
		const cl_env_ptr the_env = ecl_process_env();
#line 293
		#line 293
		cl_object __value0 = ecl_make_foreign_data(tag, 0, array->array.self.bc);
#line 293
		the_env->nvalues = 1;
#line 293
		return __value0;
#line 293
	}
;
}
开发者ID:hoobaa,项目名称:mecl,代码行数:28,代码来源:ffi.o.c


示例15: si_allocate_foreign_data

cl_object
si_allocate_foreign_data(cl_object tag, cl_object size)
{
	cl_object output = ecl_alloc_object(t_foreign);
	cl_index bytes = ecl_to_size(size);
	output->foreign.tag = tag;
	output->foreign.size = bytes;
	/* FIXME! Should be atomic uncollectable or malloc, but we do not export
	 * that garbage collector interface and malloc may be overwritten
	 * by the GC library */
	output->foreign.data = bytes? ecl_alloc_uncollectable(bytes) : NULL;
	{
#line 260
		const cl_env_ptr the_env = ecl_process_env();
#line 260
		#line 260
		cl_object __value0 = output;
#line 260
		the_env->nvalues = 1;
#line 260
		return __value0;
#line 260
	}

}
开发者ID:hoobaa,项目名称:mecl,代码行数:25,代码来源:ffi.o.c


示例16: cl_copy_list

cl_object
cl_copy_list(cl_object x)
{
	cl_object copy;
	if (ecl_unlikely(!LISTP(x))) {
                FEwrong_type_only_arg(ecl_make_fixnum(/*COPY-LIST*/257), x, ecl_make_fixnum(/*LIST*/481));
	}
	copy = ECL_NIL;
	if (!Null(x)) {
		cl_object tail = copy = ecl_list1(CAR(x));
		while (x = ECL_CONS_CDR(x), CONSP(x)) {
			cl_object cons = ecl_list1(ECL_CONS_CAR(x));
			ECL_RPLACD(tail, cons);
			tail = cons;
		}
		ECL_RPLACD(tail, x);
	}
	{
#line 441
		const cl_env_ptr the_env = ecl_process_env();
#line 441
		#line 441
		cl_object __value0 = copy;
#line 441
		the_env->nvalues = 1;
#line 441
		return __value0;
#line 441
	}
;
}
开发者ID:hoobaa,项目名称:mecl,代码行数:31,代码来源:list.o.c


示例17: mp_giveup_rwlock_read

cl_object
mp_giveup_rwlock_read(cl_object lock)
{
        /* Must be called with interrupts disabled. */
	if (ecl_t_of(lock) != t_rwlock)
		FEerror_not_a_rwlock(lock);
#ifdef ECL_RWLOCK
        {
                int rc = pthread_rwlock_unlock(&lock->rwlock.mutex);
                if (rc)
                        FEunknown_rwlock_error(lock, rc);
                {
#line 113
	const cl_env_ptr the_env = ecl_process_env();
#line 113
	#line 113
	cl_object __value0 = ECL_T;
#line 113
	the_env->nvalues = 1;
#line 113
	return __value0;
#line 113
}
;
        }
#else
        return mp_giveup_lock(lock->rwlock.mutex);
#endif
}
开发者ID:hoobaa,项目名称:mecl,代码行数:29,代码来源:rwlock.o.c


示例18: cl_numerator

cl_object
cl_numerator(cl_object x)
{
	switch (ecl_t_of(x)) {
	case t_ratio:
		x = x->ratio.num;
		break;
	case t_fixnum:
	case t_bignum:
		break;
	default:
                FEwrong_type_nth_arg(ecl_make_fixnum(/*NUMERATOR*/608),1,x,ecl_make_fixnum(/*RATIONAL*/687));
	}
	{
#line 99
		const cl_env_ptr the_env = ecl_process_env();
#line 99
		#line 99
		cl_object __value0 = x;
#line 99
		the_env->nvalues = 1;
#line 99
		return __value0;
#line 99
	}

}
开发者ID:hoobaa,项目名称:mecl,代码行数:27,代码来源:num_co.o.c


示例19: si_proper_list_p

cl_object
si_proper_list_p(cl_object x)
{
	cl_fixnum n;
	cl_object fast, slow, test = ECL_T;
	/* INV: A list's length always fits in a fixnum */
	fast = slow = x;
	for (n = 0; !Null(fast); n++, fast = ECL_CONS_CDR(fast)) {
		if (!LISTP(fast)) {
                        test = ECL_NIL;
                        break;
		}
		if (n & 1) {
			/* Circular list? */
			if (slow == fast) {
                                test = ECL_NIL;
                                break;
                        }
			slow = ECL_CONS_CDR(slow);
		}
	}
	{
#line 333
		const cl_env_ptr the_env = ecl_process_env();
#line 333
		#line 333
		cl_object __value0 = test;
#line 333
		the_env->nvalues = 1;
#line 333
		return __value0;
#line 333
	}
;
}
开发者ID:hoobaa,项目名称:mecl,代码行数:35,代码来源:list.o.c


示例20: si_compiled_function_block

cl_object
si_compiled_function_block(cl_object fun)
{
       cl_object output;

       switch(ecl_t_of(fun)) {
       case t_cfun:
	       output = fun->cfun.block; break;
       case t_cfunfixed:
	       output = fun->cfunfixed.block; break;
       case t_cclosure:
	       output = fun->cclosure.block; break;
       default:
	       FEerror("~S is not a C compiled function.", 1, fun);
       }
       {
#line 182
	const cl_env_ptr the_env = ecl_process_env();
#line 182
	#line 182
	cl_object __value0 = output;
#line 182
	the_env->nvalues = 1;
#line 182
	return __value0;
#line 182
}

}
开发者ID:hoobaa,项目名称:mecl,代码行数:29,代码来源:cfun.o.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ecma_deref_ecma_string函数代码示例发布时间:2022-05-30
下一篇:
C++ echo函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap