Beispiel #1
0
void
weechat_lua_pushhashtable (lua_State *interpreter, struct t_hashtable *hashtable)
{
    lua_newtable (interpreter);

    weechat_hashtable_map_string (hashtable,
                                  &weechat_lua_hashtable_map_cb,
                                  interpreter);
}
Beispiel #2
0
v8::Handle<v8::Object>
weechat_js_hashtable_to_object (struct t_hashtable *hashtable)
{
    v8::Handle<v8::Object> obj = v8::Object::New();

    weechat_hashtable_map_string (hashtable,
                                  &weechat_js_hashtable_map_cb,
                                  &obj);
    return obj;
}
Beispiel #3
0
SCM
weechat_guile_hashtable_to_alist (struct t_hashtable *hashtable)
{
    SCM alist;

    alist = scm_list_n (SCM_UNDEFINED);

    weechat_hashtable_map_string (hashtable,
                                  &weechat_guile_hashtable_map_cb,
                                  &alist);

    return alist;
}
Beispiel #4
0
HV *
weechat_perl_hashtable_to_hash (struct t_hashtable *hashtable)
{
    HV *hash;

    hash = (HV *)newHV ();
    if (!hash)
        return NULL;

    weechat_hashtable_map_string (hashtable, &weechat_perl_hashtable_map_cb,
                                  hash);

    return hash;
}
Beispiel #5
0
VALUE
weechat_ruby_hashtable_to_hash (struct t_hashtable *hashtable)
{
    VALUE hash;

    hash = rb_hash_new ();
    if (NIL_P (hash))
        return Qnil;

    weechat_hashtable_map_string (hashtable, &weechat_ruby_hashtable_map_cb,
                                  &hash);

    return hash;
}
Beispiel #6
0
PyObject *
weechat_python_hashtable_to_dict (struct t_hashtable *hashtable)
{
    PyObject *dict;

    dict = PyDict_New ();
    if (!dict)
    {
        Py_INCREF(Py_None);
        return Py_None;
    }

    weechat_hashtable_map_string (hashtable,
                                  &weechat_python_hashtable_map_cb,
                                  dict);

    return dict;
}
Beispiel #7
0
Tcl_Obj *
weechat_tcl_hashtable_to_dict (Tcl_Interp *interp,
                               struct t_hashtable *hashtable)
{
    Tcl_Obj *dict;
    void *data[2];

    dict = Tcl_NewDictObj ();
    if (!dict)
        return NULL;

    data[0] = interp;
    data[1] = dict;

    weechat_hashtable_map_string (hashtable, &weechat_tcl_hashtable_map_cb,
                                  data);

    return dict;
}