static METHOD Method_isAbstract(Ctx *ctx, knh_sfp_t *sfp, long rix)
{
	RETURNb_(knh_Method_isAbstract(sfp[0].mtdOBJ));
}
static METHOD Object_isNotNull(Ctx *ctx, knh_sfp_t *sfp, long rix)
{
	RETURNb_(IS_NOTNULL(sfp[0].o));
}
Esempio n. 3
0
//## Boolean Python.eval(String script);
static KMETHOD Python_eval(KonohaContext *kctx, KonohaStack *sfp)
{
	RETURNb_(PyRun_SimpleString(S_text(sfp[1].asString)) == 0);
}
Esempio n. 4
0
static KMETHOD PyObject_toBoolean(KonohaContext *kctx, KonohaStack *sfp)
{
	kPyObject *po = (kPyObject*)sfp[0].asObject;
	RETURNb_(po->self == Py_True ? 1 : 0);
}
Esempio n. 5
0
/* float >= float */
static KMETHOD Int_opGTE(KonohaContext *kctx, KonohaStack *sfp)
{
	RETURNb_(sfp[0].intValue >= sfp[1].floatValue);
}
Esempio n. 6
0
/* float > float */
static KMETHOD Float_opGT(KonohaContext *kctx, KonohaStack *sfp)
{
	RETURNb_(sfp[0].floatValue > sfp[1].floatValue);
}