Objective Tcl API
From: Googie (googie_at_no.spam.org)
Date: 02/25/05
- Next message: Helmut Giese: "Re: IPC using named pipes (Windows): Any links?"
- Previous message: Bruce Hartweg: "Re: IPC using named pipes (Windows): Any links?"
- Next in thread: George Petasis: "Re: Objective Tcl API"
- Reply: George Petasis: "Re: Objective Tcl API"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 25 Feb 2005 23:25:14 +0100
Take a look at this short code:
int Func(clientData, interp, objc, objv)
ClientData clientData;
Tcl_Interp* interp;
int objc;
Tcl_Obj* const objv[];
{
if (objc != 2)
{
Tcl_WrongNumArgs(interp, 1, NULL, "arg");
return TCL_ERROR;
}
char* arg = Tcl_GetStringFromObj(objv[1], NULL);
if (arg)
{
printf("1\n");
printf("arg is: %s\n", arg);
}
else
{
printf("2\n");
}
// .........
}
I register this function (as extension) in Tcl interpreter and when I
call it, Tcl crashes, exactly after displaying:
1
arg is:
Why? What am I doing wrong? I have no problems with 'int argc, char*
argv[]' function arguments, but I want to switch to objective one.
-- Pozdrawiam (Greetings)! Googie
- Next message: Helmut Giese: "Re: IPC using named pipes (Windows): Any links?"
- Previous message: Bruce Hartweg: "Re: IPC using named pipes (Windows): Any links?"
- Next in thread: George Petasis: "Re: Objective Tcl API"
- Reply: George Petasis: "Re: Objective Tcl API"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|