Thank you Damon for the quick answer. On Fri, 7 Nov 2008 13:10:36 -0600, Damon Courtney wrote > > > > TCL_CMD_HEADER( Rivet_Parse ) > > { > > char *filename; > > Tcl_StatBuf buf; > > Tcl_Obj *fnobj; > > ... > > fnobj = Tcl_NewStringObj(filename, -1); > > Tcl_IncrRefCount(fnobj); > > retval = Tcl_FSStat(fnobj, &buf); > > Tcl_DecrRefCount(fnobj); > > ... > > I believe that the Tcl_FSStat() call is actually decr'ing the > refcount for you. I couldn't tell you why, but I've run into a > number of occasions where the FS calls do this. The code is pretty > simple, so from looking at it, it's the only explanation I can come > up with. 0-] > > Damon >
Isn't the value of pointer (not its address) that is passed to Tcl_FSStat? I might be discovering my knowledge of the C language fundamental mechanisms is overly naive, but how the pointer value get set to 0 in the caller's scope? -- Massimo --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]