Esempio n. 1
0
bool
gjs_struct_foreign_convert_from_g_argument(JSContext             *context,
                                           JS::MutableHandleValue value_p,
                                           GIBaseInfo            *interface_info,
                                           GIArgument            *arg)
{
    GjsForeignInfo *foreign;

    foreign = gjs_struct_foreign_lookup(context, interface_info);
    if (!foreign)
        return false;

    if (!foreign->from_func(context, value_p, arg))
        return false;

    return true;
}
Esempio n. 2
0
JSBool
gjs_struct_foreign_convert_from_g_argument(JSContext  *context,
                                           jsval      *value_p,
                                           GIBaseInfo *interface_info,
                                           GArgument  *arg)
{
    GjsForeignInfo *foreign;

    foreign = gjs_struct_foreign_lookup(context, interface_info);
    if (!foreign)
        return JS_FALSE;

    if (!foreign->from_func(context, value_p, arg))
        return JS_FALSE;

    return JS_TRUE;
}