~ubuntu-branches/ubuntu/wily/weechat/wily

« back to all changes in this revision

Viewing changes to src/plugins/tcl/weechat-tcl-api.c

  • Committer: Package Import Robot
  • Author(s): Emmanuel Bouthenot
  • Date: 2014-02-13 12:11:54 UTC
  • mfrom: (29.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140213121154-k6sdmtnralvjbmgq
Tags: 0.4.3-2
* Add missing symlink for Polish manpage
* Change ruby-* Build-Depends to gem2deb so that ruby plugin will be
  built against the newest Ruby interpreter available (Closes: #738685)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 *
4
4
 * Copyright (C) 2008-2010 Dmitry Kobylin <fnfal@academ.tsc.ru>
5
5
 * Copyright (C) 2008 Julien Louis <ptitlouis@sysif.net>
6
 
 * Copyright (C) 2008-2013 Sebastien Helleu <flashcode@flashtux.org>
 
6
 * Copyright (C) 2008-2014 Sébastien Helleu <flashcode@flashtux.org>
7
7
 * Copyright (C) 2012 Simon Arlott
8
8
 *
9
9
 * This file is part of WeeChat, the extensible chat client.
3505
3505
}
3506
3506
 
3507
3507
static int
 
3508
weechat_tcl_api_hook_set (ClientData clientData, Tcl_Interp *interp,
 
3509
                          int objc, Tcl_Obj *CONST objv[])
 
3510
{
 
3511
    Tcl_Obj *objp;
 
3512
    char *hook, *property, *value;
 
3513
    int i;
 
3514
 
 
3515
    API_FUNC(1, "hook_set", API_RETURN_ERROR);
 
3516
    if (objc < 4)
 
3517
        API_WRONG_ARGS(API_RETURN_ERROR);
 
3518
 
 
3519
    hook = Tcl_GetStringFromObj (objv[1], &i);
 
3520
    property = Tcl_GetStringFromObj (objv[2], &i);
 
3521
    value = Tcl_GetStringFromObj (objv[3], &i);
 
3522
 
 
3523
    weechat_hook_set (API_STR2PTR(hook), property, value);
 
3524
 
 
3525
    API_RETURN_OK;
 
3526
}
 
3527
 
 
3528
static int
3508
3529
weechat_tcl_api_unhook (ClientData clientData, Tcl_Interp *interp,
3509
3530
                        int objc, Tcl_Obj *CONST objv[])
3510
3531
{
5809
5830
    API_DEF_FUNC(hook_info_hashtable);
5810
5831
    API_DEF_FUNC(hook_infolist);
5811
5832
    API_DEF_FUNC(hook_focus);
 
5833
    API_DEF_FUNC(hook_set);
5812
5834
    API_DEF_FUNC(unhook);
5813
5835
    API_DEF_FUNC(unhook_all);
5814
5836
    API_DEF_FUNC(buffer_new);