Golang C.duk_idx_t类(方法)实例源码

下面列出了Golang C.duk_idx_t 类(方法)源码代码实例,从而了解它的用法。

作者:ramsdenc    项目:go-duktap   
// See: http://duktape.org/api.html#duk_safe_call
func (d *Context) SafeCall(fn *[0]byte, nargs, nrets int) int {
	return int(C.duk_safe_call(
		d.duk_context,
		fn,
		C.duk_idx_t(nargs),
		C.duk_idx_t(nrets),
	))
}

作者:ramsdenc    项目:go-duktap   
// See: http://duktape.org/api.html#duk_next
func (d *Context) Next(enumIndex int, getValue bool) bool {
	var __getValue__ int
	if getValue {
		__getValue__ = 1
	}
	return int(C.duk_next(d.duk_context, C.duk_idx_t(enumIndex), C.duk_bool_t(__getValue__))) == 1
}

作者:ramsdenc    项目:go-duktap   
// See: http://duktape.org/api.html#duk_hex_decode
func (d *Context) HexDecode(index int) {
	C.duk_hex_decode(d.duk_context, C.duk_idx_t(index))
}

作者:ramsdenc    项目:go-duktap   
// See: http://duktape.org/api.html#duk_pop_n
func (d *Context) PopN(count int) {
	if d.GetTop() < count || count < 1 {
		return
	}
	C.duk_pop_n(d.duk_context, C.duk_idx_t(count))
}

作者:ramsdenc    项目:go-duktap   
// See: http://duktape.org/api.html#duk_pcall_method
func (d *Context) PcallMethod(nargs int) int {
	return int(C.duk_pcall_method(d.duk_context, C.duk_idx_t(nargs)))
}

作者:ramsdenc    项目:go-duktap   
// See: http://duktape.org/api.html#duk_json_encode
func (d *Context) JsonEncode(index int) string {
	if s := C.duk_json_encode(d.duk_context, C.duk_idx_t(index)); s != nil {
		return C.GoString(s)
	}
	return ""
}

作者:ramsdenc    项目:go-duktap   
// See: http://duktape.org/api.html#duk_join
func (d *Context) Join(count int) {
	C.duk_join(d.duk_context, C.duk_idx_t(count))
}

作者:ramsdenc    项目:go-duktap   
// See: http://duktape.org/api.html#duk_is_undefined
func (d *Context) IsUndefined(index int) bool {
	return int(C.duk_is_undefined(d.duk_context, C.duk_idx_t(index))) == 1
}

作者:ramsdenc    项目:go-duktap   
// See: http://duktape.org/api.html#duk_is_fixed_buffer
func (d *Context) IsFixedBuffer(index int) bool {
	return int(C.duk_is_fixed_buffer(d.duk_context, C.duk_idx_t(index))) == 1
}

作者:ramsdenc    项目:go-duktap   
// See: http://duktape.org/api.html#duk_is_ecmascript_function
func (d *Context) IsEcmascriptFunction(index int) bool {
	return int(C.duk_is_ecmascript_function(d.duk_context, C.duk_idx_t(index))) == 1
}

作者:ramsdenc    项目:go-duktap   
// See: http://duktape.org/api.html#duk_is_dynamic_buffer
func (d *Context) IsDynamicBuffer(index int) bool {
	return int(C.duk_is_dynamic_buffer(d.duk_context, C.duk_idx_t(index))) == 1
}

作者:ramsdenc    项目:go-duktap   
// See: http://duktape.org/api.html#duk_is_callable
func (d *Context) IsCallable(index int) bool {
	return int(C.duk_is_callable(d.duk_context, C.duk_idx_t(index))) == 1
}

作者:ramsdenc    项目:go-duktap   
// See: http://duktape.org/api.html#duk_is_boolean
func (d *Context) IsBoolean(index int) bool {
	return int(C.duk_is_boolean(d.duk_context, C.duk_idx_t(index))) == 1
}

作者:ramsdenc    项目:go-duktap   
// See: http://duktape.org/api.html#duk_is_array
func (d *Context) IsArray(index int) bool {
	return int(C.duk_is_array(d.duk_context, C.duk_idx_t(index))) == 1
}

作者:ramsdenc    项目:go-duktap   
// See: http://duktape.org/api.html#duk_insert
func (d *Context) Insert(toIndex int) {
	C.duk_insert(d.duk_context, C.duk_idx_t(toIndex))
}

作者:ramsdenc    项目:go-duktap   
// See: http://duktape.org/api.html#duk_is_string
func (d *Context) IsString(index int) bool {
	return int(C.duk_is_string(d.duk_context, C.duk_idx_t(index))) == 1
}

作者:ramsdenc    项目:go-duktap   
// See: http://duktape.org/api.html#duk_is_thread
func (d *Context) IsThread(index int) bool {
	return int(C.duk_is_thread(d.duk_context, C.duk_idx_t(index))) == 1
}

作者:ramsdenc    项目:go-duktap   
// See: http://duktape.org/api.html#duk_is_function
func (d *Context) IsFunction(index int) bool {
	return int(C.duk_is_function(d.duk_context, C.duk_idx_t(index))) == 1
}

作者:ramsdenc    项目:go-duktap   
// See: http://duktape.org/api.html#duk_is_valid_index
func (d *Context) IsValidIndex(index int) bool {
	return int(C.duk_is_valid_index(d.duk_context, C.duk_idx_t(index))) == 1
}

作者:ramsdenc    项目:go-duktap   
// See: http://duktape.org/api.html#duk_is_null
func (d *Context) IsNull(index int) bool {
	return int(C.duk_is_null(d.duk_context, C.duk_idx_t(index))) == 1
}


问题


面经


文章

微信
公众号

扫码关注公众号