summaryrefslogtreecommitdiff
path: root/src/plugins/scripts
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2009-03-06 23:46:51 +0100
committerSebastien Helleu <flashcode@flashtux.org>2009-03-06 23:46:51 +0100
commit780a7478ee02952c23ff7b71d1ec7bc02fdad5ce (patch)
tree266f90a67b04d124cd970156d0c1b23b245c2701 /src/plugins/scripts
parent700ce289aeb87ed4d07ac498cb2771bcf67a7549 (diff)
downloadweechat-780a7478ee02952c23ff7b71d1ec7bc02fdad5ce.zip
Fix bug with namespace in tcl plugin (bug #25754)
Diffstat (limited to 'src/plugins/scripts')
-rw-r--r--src/plugins/scripts/tcl/weechat-tcl-api.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/plugins/scripts/tcl/weechat-tcl-api.c b/src/plugins/scripts/tcl/weechat-tcl-api.c
index 59927ec36..94e32e718 100644
--- a/src/plugins/scripts/tcl/weechat-tcl-api.c
+++ b/src/plugins/scripts/tcl/weechat-tcl-api.c
@@ -130,7 +130,7 @@
if (__string) \
{ \
Tcl_SetStringObj (objp, __string, -1); \
- free(__string); \
+ free (__string); \
return TCL_OK; \
} \
Tcl_SetStringObj (objp, "", -1); \
@@ -6056,18 +6056,16 @@ weechat_tcl_api_upgrade_close (ClientData clientData, Tcl_Interp *interp,
* weechat_tcl_api_init: initialize subroutines
*/
-void weechat_tcl_api_init (Tcl_Interp *interp) {
+void weechat_tcl_api_init (Tcl_Interp *interp)
+{
int i;
Tcl_Obj *objp;
/* standard initializer */
Tcl_Init (interp);
-#ifdef HAVE_TCL_CREATE_NS
- /* create weechat namespace */
- Tcl_CreateNamespace (interp, "weechat", (ClientData)0, NULL);
-#endif
-
+ Tcl_Eval (interp,"namespace eval weechat {}");
+
/* interface constants */
/* set variables, TODO: make them unmodifiable (thru Tcl_TraceVar) ? */
/* NOTE: it is not good for performance to convert "defines" to Tcl_Obj */