mirror of
https://github.com/weechat/weechat.git
synced 2026-06-30 14:56:39 +02:00
Add function "hashtable_has_key" in WeeChat and plugin API
This commit is contained in:
@@ -2980,6 +2980,43 @@ void *value = weechat_hashtable_get (hashtable, "my_key");
|
||||
[NOTE]
|
||||
This function is not available in scripting API.
|
||||
|
||||
weechat_hashtable_has_key
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
_New in version 0.3.4._
|
||||
|
||||
Return 1 if hashtable has key, otherwise 0.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
int weechat_hashtable_has_key (struct t_hashtable *hashtable, void *key);
|
||||
----------------------------------------
|
||||
|
||||
Arguments:
|
||||
|
||||
* 'hashtable': hashtable pointer
|
||||
* 'key': key pointer
|
||||
|
||||
Return value:
|
||||
|
||||
* 1 if key is in hashtable, 0 if key is not in hashtable
|
||||
|
||||
C example:
|
||||
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
if (weechat_hashtable_has_key (hashtable, "my_key"))
|
||||
{
|
||||
/* key is in hashtable */
|
||||
/* ... */
|
||||
}
|
||||
----------------------------------------
|
||||
|
||||
[NOTE]
|
||||
This function is not available in scripting API.
|
||||
|
||||
weechat_hashtable_map
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@@ -3011,6 +3011,43 @@ void *value = weechat_hashtable_get (hashtable, "ma_cle");
|
||||
[NOTE]
|
||||
Cette fonction n'est pas disponible dans l'API script.
|
||||
|
||||
weechat_hashtable_has_key
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
_Nouveau dans la version 0.3.4._
|
||||
|
||||
Retourne 1 si la clé est dans la hashtable, sinon 0.
|
||||
|
||||
Prototype :
|
||||
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
int weechat_hashtable_has_key (struct t_hashtable *hashtable, void *key);
|
||||
----------------------------------------
|
||||
|
||||
Paramètres :
|
||||
|
||||
* 'hashtable' : pointeur vers la hashtable
|
||||
* 'key' : pointeur vers la clé
|
||||
|
||||
Valeur en retour :
|
||||
|
||||
* 1 si la clé est dans la hashtable, 0 si la clé n'est pas dans la hashtable
|
||||
|
||||
Exemple en C :
|
||||
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
if (weechat_hashtable_has_key (hashtable, "ma_cle"))
|
||||
{
|
||||
/* la clé est dans la hashtable */
|
||||
/* ... */
|
||||
}
|
||||
----------------------------------------
|
||||
|
||||
[NOTE]
|
||||
Cette fonction n'est pas disponible dans l'API script.
|
||||
|
||||
weechat_hashtable_map
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@@ -3013,6 +3013,46 @@ void *value = weechat_hashtable_get (hashtable, "my_key");
|
||||
[NOTE]
|
||||
Questa funzione non è disponibile nelle API per lo scripting.
|
||||
|
||||
weechat_hashtable_has_key
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
_Novità nella versione 0.3.4._
|
||||
|
||||
// TRANSLATION MISSING
|
||||
Return 1 if hashtable has key, otherwise 0.
|
||||
|
||||
Prototipo:
|
||||
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
int weechat_hashtable_has_key (struct t_hashtable *hashtable, void *key);
|
||||
----------------------------------------
|
||||
|
||||
Argomenti:
|
||||
|
||||
* 'hashtable': puntatore alla tabella hash
|
||||
* 'key': puntatore alla chiave
|
||||
|
||||
Valore restituito:
|
||||
|
||||
// TRANSLATION MISSING
|
||||
* 1 if key is in hashtable, 0 if key is not in hashtable
|
||||
|
||||
Esempio in C:
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
if (weechat_hashtable_has_key (hashtable, "my_key"))
|
||||
{
|
||||
/* key is in hashtable */
|
||||
/* ... */
|
||||
}
|
||||
----------------------------------------
|
||||
|
||||
[NOTE]
|
||||
This function is not available in scripting API.
|
||||
|
||||
weechat_hashtable_map
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
Reference in New Issue
Block a user