本文整理汇总了C++中EINA_SAFETY_ON_NULL_RETURN函数的典型用法代码示例。如果您正苦于以下问题:C++ EINA_SAFETY_ON_NULL_RETURN函数的具体用法?C++ EINA_SAFETY_ON_NULL_RETURN怎么用?C++ EINA_SAFETY_ON_NULL_RETURN使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了EINA_SAFETY_ON_NULL_RETURN函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: shotgun_ping_delay_set
void
shotgun_ping_delay_set(Shotgun_Auth *auth, double delay)
{
EINA_SAFETY_ON_NULL_RETURN(auth);
auth->ping_delay = delay;
if (auth->et_ping)
ecore_timer_interval_set(auth->et_ping, auth->ping_delay);
}
开发者ID:Limsik,项目名称:e17,代码行数:8,代码来源:shotgun.c
示例2: store_free
/**
* @brief Frees an allocated Store structure.
* @param store Store structure to free.
*/
void
store_free(Store *store)
{
EINA_SAFETY_ON_NULL_RETURN(store);
eina_stringshare_replace(&store->url, NULL);
free(store);
}
开发者ID:gfriloux,项目名称:smman,代码行数:12,代码来源:store_main.c
示例3: shotgun_ping_timeout_set
void
shotgun_ping_timeout_set(Shotgun_Auth *auth, double timeout)
{
EINA_SAFETY_ON_NULL_RETURN(auth);
auth->ping_timeout = timeout;
if (auth->et_ping_timeout)
ecore_timer_interval_set(auth->et_ping_timeout, auth->ping_timeout);
}
开发者ID:Limsik,项目名称:e17,代码行数:8,代码来源:shotgun.c
示例4: e_bluez_devicefound_free
/**
* Free a E_Bluez_Device_Found struct
*
* @param device the struct to be freed
*/
void
e_bluez_devicefound_free(E_Bluez_Device_Found *device)
{
EINA_SAFETY_ON_NULL_RETURN(device);
eina_stringshare_del(device->name);
e_bluez_element_array_free(device->array, NULL);
}
开发者ID:Limsik,项目名称:e17,代码行数:13,代码来源:e_bluez_devicefound.c
示例5: _elm_plug_disconnected
static void
_elm_plug_disconnected(Ecore_Evas *ee)
{
Evas_Object *plug = ecore_evas_data_get(ee, PLUG_KEY);
EINA_SAFETY_ON_NULL_RETURN(plug);
eo_do(plug, eo_event_callback_call(ELM_PLUG_EVENT_IMAGE_DELETED, NULL));
/* TODO: was a typo. Deprecated, remove in future releases: */
evas_object_smart_callback_call(plug, "image.deleted", NULL);
}
开发者ID:FlorentRevest,项目名称:Elementary,代码行数:9,代码来源:elm_plug.c
示例6: ewk_cookies_cookie_free
void ewk_cookies_cookie_free(Ewk_Cookie* cookie)
{
EINA_SAFETY_ON_NULL_RETURN(cookie);
eina_stringshare_del(cookie->name);
eina_stringshare_del(cookie->value);
eina_stringshare_del(cookie->domain);
eina_stringshare_del(cookie->path);
delete cookie;
}
开发者ID:JefferyJeffery,项目名称:webkit,代码行数:9,代码来源:ewk_cookies.cpp
示例7: esql_mysac_query
static void
esql_mysac_query(Esql *e, const char *query, unsigned int len EINA_UNUSED)
{
MYSAC_RES *res;
res = mysac_new_res(2048, 1);
EINA_SAFETY_ON_NULL_RETURN(res);
mysac_s_set_query(e->backend.db, res, query);
}
开发者ID:carloslack,项目名称:esskyuehl,代码行数:9,代码来源:esql_mysql_backend.c
示例8: esql_reconnect_set
/**
* @brief Set automatic reconnect mode
* @param e The #Esql object (NOT NULL)
* @param enable If EINA_TRUE, this feature is enabled.
*
* This function enables autoreconnect mode, where a server connection will automatically
* re-establish itself if disconnection occurs for any reason.
*/
void
esql_reconnect_set(Esql *e,
Eina_Bool enable)
{
EINA_SAFETY_ON_NULL_RETURN(e);
e->reconnect = enable;
if (e->pool) esql_pool_reconnect_set((Esql_Pool*)e, enable);
}
开发者ID:Limsik,项目名称:e17,代码行数:17,代码来源:esql_connect.c
示例9: eina_array_free
EAPI void
eina_array_free(Eina_Array *array)
{
eina_array_flush(array);
EINA_SAFETY_ON_NULL_RETURN(array);
EINA_MAGIC_CHECK_ARRAY(array);
MAGIC_FREE(array);
}
开发者ID:jigpu,项目名称:efl,代码行数:9,代码来源:eina_array.c
示例10: esql_connect_callback_set
/**
* @brief Set a connected callback for an #Esql object
* Use this function to set a callback to override the ESQL_EVENT_CONNECTED event,
* calling @p cb with @p data instead.
* @param e The #Esql object (NOT NULL)
* @param cb The callback
* @param data The data
*/
void
esql_connect_callback_set(Esql *e,
Esql_Connect_Cb cb,
void *data)
{
EINA_SAFETY_ON_NULL_RETURN(e);
e->connect_cb = cb;
e->connect_cb_data = data;
}
开发者ID:Limsik,项目名称:e17,代码行数:18,代码来源:esql_connect.c
示例11: _elm_plug_resized
static void
_elm_plug_resized(Ecore_Evas *ee)
{
Evas_Coord_Size size = {0, 0};
Evas_Object *plug = ecore_evas_data_get(ee, PLUG_KEY);
EINA_SAFETY_ON_NULL_RETURN(plug);
ecore_evas_geometry_get(ee, NULL, NULL, &(size.w), &(size.h));
eo_do(plug, eo_event_callback_call(ELM_PLUG_EVENT_IMAGE_RESIZED, &size));
}
开发者ID:FlorentRevest,项目名称:Elementary,代码行数:10,代码来源:elm_plug.c
示例12: _ecore_imf_context_xim_input_panel_hide
static void
_ecore_imf_context_xim_input_panel_hide(Ecore_IMF_Context *ctx)
{
Ecore_IMF_Context_Data *imf_context_data = ecore_imf_context_data_get(ctx);
DBG("ctx=%p, imf_context_data=%p", ctx, imf_context_data);
EINA_SAFETY_ON_NULL_RETURN(imf_context_data);
ecore_x_e_virtual_keyboard_state_set
(imf_context_data->win, ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF);
}
开发者ID:RomainNaour,项目名称:efl,代码行数:10,代码来源:ecore_imf_xim.c
示例13: ewk_paint_context_free
void ewk_paint_context_free(Ewk_Paint_Context* context)
{
EINA_SAFETY_ON_NULL_RETURN(context);
if (context->image && context->pixels) {
// Decrease refcount inside image object.
evas_object_image_data_set(context->image, context->pixels);
}
delete context;
}
开发者ID:dog-god,项目名称:iptv,代码行数:10,代码来源:ewk_paint_context.cpp
示例14: _on_conn_message_cb
static void
_on_conn_message_cb(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
{
Eldbus_Message_Cb cb = eldbus_pending_data_del(pending, "__user_cb");
Eldbus_Connection *conn = eldbus_pending_data_del(pending, "__connection");
EINA_SAFETY_ON_NULL_RETURN(conn);
eldbus_connection_pending_del(conn, pending);
cb(data, msg, pending);
}
开发者ID:FlorentRevest,项目名称:EFL,代码行数:10,代码来源:eldbus_pending.c
示例15: animal_eat
void
animal_eat(Eina_Model *m)
{
EINA_SAFETY_ON_FALSE_RETURN(eina_model_instance_check(m, ANIMAL_TYPE));
void (*pf)(Eina_Model *m);
pf = eina_model_method_resolve(m, Animal_Type, eat);
EINA_SAFETY_ON_NULL_RETURN(pf);
printf("%s() \t", __func__);
pf(m);
}
开发者ID:Limsik,项目名称:e17,代码行数:11,代码来源:eina_model_04_animal.c
示例16: e_xinerama_fake_screen_del
EINTERN void
e_xinerama_fake_screen_del(int num)
{
Eina_List *l;
E_Screen *scr, *lscr;
int n = 0, x = 0;
/* this assumes X number of identical horizontal screens */
EINA_SAFETY_ON_NULL_RETURN(fake_screens);
l = eina_list_nth_list(fake_screens, num);
EINA_SAFETY_ON_NULL_RETURN(l);
scr = eina_list_data_get(l);
free(scr);
fake_screens = eina_list_remove_list(fake_screens, l);
EINA_LIST_FOREACH(fake_screens, l, lscr)
{
lscr->screen = n++;
lscr->x = x;
lscr->w = e_comp->w / eina_list_count(fake_screens);
x = lscr->x + lscr->w;
}
开发者ID:tasn,项目名称:enlightenment,代码行数:21,代码来源:e_xinerama.c
示例17: ewk_paint_context_paint_contents
void ewk_paint_context_paint_contents(Ewk_Paint_Context* context, WebCore::FrameView* view, const Eina_Rectangle* area)
{
EINA_SAFETY_ON_NULL_RETURN(context);
EINA_SAFETY_ON_NULL_RETURN(view);
EINA_SAFETY_ON_NULL_RETURN(area);
WebCore::IntRect paintArea(*area);
if (view->isTransparent())
context->graphicContext->clearRect(paintArea);
view->paintContents(context->graphicContext.get(), paintArea);
#if ENABLE(INSPECTOR)
WebCore::Page* page = view->frame()->page();
if (page) {
WebCore::InspectorController* controller = page->inspectorController();
if (controller->highlightedNode())
controller->drawHighlight(*context->graphicContext);
}
#endif
}
开发者ID:dog-god,项目名称:iptv,代码行数:21,代码来源:ewk_paint_context.cpp
示例18: ewk_intent_request_unref
void ewk_intent_request_unref(Ewk_Intent_Request* request)
{
#if ENABLE(WEB_INTENTS)
EINA_SAFETY_ON_NULL_RETURN(request);
if (--request->__ref)
return;
ewk_intent_free(request->intent);
delete request;
#endif
}
开发者ID:dog-god,项目名称:iptv,代码行数:12,代码来源:ewk_intent_request.cpp
示例19: ewk_js_object_type_set
void ewk_js_object_type_set(Ewk_JS_Object* jsObject, Ewk_JS_Object_Type type)
{
#if ENABLE(NETSCAPE_PLUGIN_API)
EINA_SAFETY_ON_NULL_RETURN(jsObject);
EINA_MAGIC_CHECK_OR_RETURN(jsObject);
jsObject->type = type;
#else
UNUSED_PARAM(jsObject);
UNUSED_PARAM(type);
#endif
}
开发者ID:dog-god,项目名称:iptv,代码行数:12,代码来源:ewk_js.cpp
示例20: efreet_setowner
EAPI void
efreet_setowner(const char *path)
{
EINA_SAFETY_ON_NULL_RETURN(path);
int fd;
fd = open(path, O_RDONLY);
if (fd < 0) return;
efreet_fsetowner(fd);
close(fd);
}
开发者ID:RomainNaour,项目名称:efl,代码行数:12,代码来源:efreet.c
注:本文中的EINA_SAFETY_ON_NULL_RETURN函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论