Posted to tcl by Stu at Tue Apr 29 22:41:48 GMT 2008view raw

  1. --- tclCep.c.orig Wed Jan 24 07:06:50 2007
  2. +++ tclCep.c Wed Jan 24 07:09:08 2007
  3. @@ -328,6 +328,7 @@
  4. char *tscript;
  5. int result;
  6. Tcl_Obj *cmd[4];
  7. + int i;
  8.  
  9. acceptCallbackPtr = (AcceptCallback *) callbackData;
  10.  
  11. @@ -356,6 +357,10 @@
  12. cmd[3] = Tcl_NewIntObj(port);
  13. }
  14.  
  15. + for (i = 0; i < 4; i++) {
  16. + Tcl_IncrRefCount(cmd[i]);
  17. + }
  18. +
  19. Tcl_RegisterChannel(tinterp, chan);
  20.  
  21. /*
  22. @@ -370,6 +375,10 @@
  23. if (result != TCL_OK) {
  24. Tcl_BackgroundError(tinterp);
  25. Tcl_UnregisterChannel(tinterp, chan);
  26. + }
  27. +
  28. + for (i = 0; i < 4; i++) {
  29. + Tcl_DecrRefCount(cmd[i]);
  30. }
  31.  
  32. /*
  33.  
  34.  
  35.  
  36.  
  37.  
  38. gcc -pipe -DPACKAGE_NAME=\"ceptcl\" -DPACKAGE_TARNAME=\"ceptcl\" -DPACKAGE_VERSION=\"0.4\" -DPACKAGE_STRING=\"ceptcl\ 0.4\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_GETPEEREID=1 -DTCL_WIDE_INT_TYPE=long\ long -DUSE_TCL_STUBS=1 -I"../generic" -I"/usr/local/include/tcl8.5" -O2 -Wall -Wno-implicit-int -fPIC -c `echo ../generic/ceptcl.c` -o ceptcl.o
  39. gcc -pipe -DPACKAGE_NAME=\"ceptcl\" -DPACKAGE_TARNAME=\"ceptcl\" -DPACKAGE_VERSION=\"0.4\" -DPACKAGE_STRING=\"ceptcl\ 0.4\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_GETPEEREID=1 -DTCL_WIDE_INT_TYPE=long\ long -DUSE_TCL_STUBS=1 -I"../generic" -I"/usr/local/include/tcl8.5" -O2 -Wall -Wno-implicit-int -fPIC -c `echo ../unix/ceptclUnix.c` -o ceptclUnix.o
  40. rm -f libceptcl04.so.1.0
  41. gcc -pipe -shared -fpic -o libceptcl04.so.1.0 ceptcl.o ceptclUnix.o -L/usr/local/lib -ltclstub85
  42.  
  43.  
  44.