static struct memo *make_memo(struct afb_req request, const char *method) { struct memo *memo = malloc(sizeof *memo); if (memo != NULL) { memo->request = request; memo->method = method; afb_req_addref(request); } return memo; }
/* allocates and init the memorizing data */ static struct dbus_memo *api_dbus_client_make_memo(struct afb_req req, struct afb_context *context) { struct dbus_memo *memo; memo = malloc(sizeof *memo); if (memo != NULL) { afb_req_addref(req); memo->req = req; memo->context = context; } return memo; }