Advertisement
Guest User

Untitled

a guest
Oct 16th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.57 KB | None | 0 0
  1. #include <tcl.h>
  2.  
  3.  
  4. int Unix_sockets_Init(Tcl_Interp *interp)
  5. {
  6.   printf("called\n");
  7.   if (Tcl_InitStubs(interp, "8.2", 0) == NULL)
  8.     return TCL_ERROR;
  9.   return TCL_OK;
  10. }
  11.  
  12. static void c_test(Tcl_Interp* interp) {
  13.   printf("running\n");
  14.   return;
  15. }
  16.  
  17. int tcl_test(ClientData clientdata, Tcl_Interp *ip, int objc, Tcl_Obj *CONST objv[]) {
  18.   if (objc != 1) {
  19.     Tcl_WrongNumArgs(ip, 1, objv, "");
  20.     return TCL_ERROR;
  21.   }
  22.  
  23. c_test(ip);
  24.   return TCL_OK;
  25. }
  26.  
  27.  
  28. /* Immediate: Tcl_CreateObjCommand(interp, "test", tcl_test, NULL, Tcc4tclDeleteClientData); */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement