本文整理汇总了C++中NativeFunction::primitive方法的典型用法代码示例。如果您正苦于以下问题:C++ NativeFunction::primitive方法的具体用法?C++ NativeFunction::primitive怎么用?C++ NativeFunction::primitive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NativeFunction
的用法示例。
在下文中一共展示了NativeFunction::primitive方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: create
NativeFunction* NativeFunction::create(STATE, Symbol* name, int args) {
NativeFunction* nf = state->new_object<NativeFunction>(G(native_function));
nf->primitive(state, state->symbol("nativefunction_call"));
nf->required(state, Fixnum::from(args));
nf->serial(state, Fixnum::from(0));
nf->name(state, name);
nf->file(state, state->symbol("<system>"));
nf->set_executor(NativeFunction::execute);
return nf;
}
示例2: create
NativeFunction* NativeFunction::create(STATE, Object* name, int args) {
NativeFunction* nf = (NativeFunction*)state->new_object(G(native_function));
nf->primitive(state, state->symbol("nativefunction_call"));
nf->required(state, Fixnum::from(args));
nf->serial(state, Fixnum::from(0));
nf->name(state, name);
nf->file(state, state->symbol("<system>"));
nf->data(state, (MemoryPointer*)Qnil);
nf->set_executor(NativeFunction::execute);
return nf;
}
示例3: create
NativeFunction* NativeFunction::create(STATE, Symbol* name, int args) {
NativeFunction* nf = state->new_object<NativeFunction>(G(native_function));
nf->primitive(state, state->symbol("nativefunction_call"));
nf->required(state, Fixnum::from(args));
nf->varargs(state, cFalse);
nf->serial(state, Fixnum::from(0));
nf->name(state, name);
nf->file(state, state->symbol("<system>"));
nf->set_executor(NativeFunction::execute);
nf->inliners_ = 0;
nf->prim_index_ = -1;
nf->custom_call_site_ = false;
nf->ffi_data = 0;
return nf;
}