Instance *RuntimeObject::msg_send(std::string signature,std::vector<Instance *>args) { Method *method = cls->msg_resove(signature); if (method) { return method_call(method, args); } return nullptr; }
bool expr_call(pass_opt_t* opt, ast_t** astp) { ast_t* ast = *astp; if(!literal_call(ast, opt)) return false; // Type already set by literal handler. Check for infertype, which is a // marker for typechecking default arguments. ast_t* type = ast_type(ast); if((type != NULL) && (ast_id(type) != TK_INFERTYPE)) return true; AST_GET_CHILDREN(ast, positional, namedargs, lhs); switch(ast_id(lhs)) { case TK_NEWREF: case TK_NEWBEREF: case TK_BEREF: case TK_FUNREF: return method_call(opt, ast); case TK_NEWAPP: case TK_BEAPP: case TK_FUNAPP: return partial_application(opt, astp); default: {} } return insert_apply(opt, astp); }
bool expr_call(pass_opt_t* opt, ast_t** astp) { ast_t* ast = *astp; if(!literal_call(ast, opt)) return false; // Type already set by literal handler if(ast_type(ast) != NULL) return true; AST_GET_CHILDREN(ast, positional, namedargs, lhs); switch(ast_id(lhs)) { case TK_NEWREF: case TK_NEWBEREF: case TK_BEREF: case TK_FUNREF: return method_call(opt, ast); case TK_NEWAPP: case TK_BEAPP: case TK_FUNAPP: return partial_application(opt, astp); default: {} } return insert_apply(opt, astp); }
int main() { init_lvm({{1024, 10}, {64,100}}); struct lvm_small s; method_call( (struct lvm_value*) &s ); }
static void drag_data_received(GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data) { GtkTreeModel *model = user_data; GtkTreePath *path; GtkTreeIter iter; DBusGProxy *source, *proxy = NULL; gboolean success = FALSE; if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(widget), x, y, &path, NULL, NULL, NULL) == FALSE) return; if (gtk_tree_model_get_iter(model, &iter, path) == FALSE) goto done; gtk_tree_model_get(model, &iter, CONNMAN_COLUMN_PROXY, &proxy, -1); if (data == NULL || data->length == 0) goto done; if (info != CONNMAN_SERVICE_MOVE) goto done; if (gtk_tree_model_get_iter_from_string(model, &iter, (gchar *) data->data) == FALSE) goto done; g_print("%s -> %s\n", (gchar *) data->data, gtk_tree_path_to_string(path)); gtk_tree_model_get(model, &iter, CONNMAN_COLUMN_PROXY, &source, -1); method_call(source, "MoveBefore", dbus_g_proxy_get_path(proxy)); g_object_unref(proxy); success = TRUE; done: gtk_tree_path_free(path); gtk_drag_finish(context, success, FALSE, time); }
const Scalar::Temp Call_stack::method_scalar(const char* const name) { assertion<Runtime_exception>( method_call(name, G_SCALAR) == 1, "More than one value returned in scalar call"); return Scalar::Temp(interp, pop(), true); }
const Array::Temp Call_stack::method_list(const char* name) { const int count = method_call(name, G_ARRAY); return Array::Temp(interp, pop_array(count), true); }
static void remove_callback(GtkWidget *widget, gpointer user_data) { DBusGProxy *proxy = get_proxy(user_data); method_call(proxy, "Remove", NULL); }
static void disconnect_callback(GtkWidget *widget, gpointer user_data) { DBusGProxy *proxy = get_proxy(user_data); method_call(proxy, "Disconnect", NULL); }