當前位置: 首頁>>代碼示例>>C++>>正文


C++ EINA_SAFETY_ON_NULL_RETURN函數代碼示例

本文整理匯總了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函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


注:本文中的EINA_SAFETY_ON_NULL_RETURN函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。