Przeglądaj źródła

* Remove Tcl_AppendResult as its symbol cannot be properly exported without more manual effort

Bryan Drewery 15 lat temu
rodzic
commit
c3a726b26c
2 zmienionych plików z 0 dodań i 11 usunięć
  1. 0 2
      src/libtcl.c
  2. 0 9
      src/libtcl.h

+ 0 - 2
src/libtcl.c

@@ -51,7 +51,6 @@ static int load_symbols(void *handle) {
   DLSYM_GLOBAL(handle, Tcl_GetStringResult);
   DLSYM_GLOBAL(handle, Tcl_DeleteInterp);
   DLSYM_GLOBAL(handle, Tcl_CreateCommand);
-//  DLSYM_GLOBAL(handle, Tcl_AppendResult);
   DLSYM_GLOBAL(handle, Tcl_CreateInterp);
   DLSYM_GLOBAL(handle, Tcl_FindExecutable);
   DLSYM_GLOBAL(handle, Tcl_Init);
@@ -103,7 +102,6 @@ int load_libtcl() {
 
 #include "chanprog.h"
 static int cmd_privmsg STDVAR {
-  BADARGS(3, 999, " channel string");
   bd::String str = argv[2];
   for (int i = 3; i < argc; ++i)
     str += " " + bd::String(argv[i]);

+ 0 - 9
src/libtcl.h

@@ -8,7 +8,6 @@
 #include <tcl.h>
 
 typedef int (*Tcl_Eval_t)(Tcl_Interp*, const char*);
-//typedef void (*Tcl_AppendResult_t)(Tcl_Interp*, ...);
 typedef Tcl_Command (*Tcl_CreateCommand_t)(Tcl_Interp*, const char*, Tcl_CmdProc*, ClientData, Tcl_CmdDeleteProc*);
 typedef const char* (*Tcl_GetStringResult_t)(Tcl_Interp*);
 typedef void (*Tcl_DeleteInterp_t)(Tcl_Interp*);
@@ -18,14 +17,6 @@ typedef int (*Tcl_Init_t)(Tcl_Interp*);
 
 #define STDVAR (ClientData cd, Tcl_Interp *interp, int argc, const char *argv[])
 
-#define BADARGS(nl, nh, example) do {                               \
-	if ((argc < (nl)) || (argc > (nh))) {                       \
-		Tcl_AppendResult(interp, "wrong # args: should be \"", \
-			argv[0], (example), "\"", NULL);            \
-		return TCL_ERROR;                                   \
-	}                                                           \
-} while (0)
-
 extern Tcl_Interp *global_interp;
 bd::String tcl_eval(const bd::String&);
 #endif