search for: tcl_obj

Displaying 14 results from an estimated 14 matches for "tcl_obj".

2018 Jul 01
2
[PATCH nbdkit] Add Tcl plugin, for writing plugins in Tcl.
...Tcl_GetStringResult (interp)); + exit (EXIT_FAILURE); + } +} + +static void +tcl_unload (void) +{ + if (interp) + Tcl_DeleteInterp (interp); + Tcl_Finalize (); +} + +/* Test if proc was defined by the Tcl code. */ +static int +proc_defined (const char *name) +{ + int r; + Tcl_Obj *cmd; + + cmd = Tcl_NewObj (); + Tcl_IncrRefCount (cmd); + Tcl_ListObjAppendElement (0, cmd, Tcl_NewStringObj ("info", -1)); + Tcl_ListObjAppendElement (0, cmd, Tcl_NewStringObj ("procs", -1)); + Tcl_ListObjAppendElement (0, cmd, Tcl_NewStringObj (name, -1)); + r = Tcl_Eva...
2020 Jun 07
5
use of the tcltk package crashes R 4.0.1 for Windows
...loc(strlen(s)+2, sizeof(char)); tmp = Calloc(strlen(s)+2, char); *tmp = '-'; strcpy(tmp+1, s); objv[objc++] = Tcl_NewStringObj(tmp, -1); free(tmp); } if (!isNull(t = VECTOR_ELT(avec, i))) objv[objc++] = (Tcl_Obj *) R_ExternalPtrAddr(t); } and I can't see how tmp can be NULL at the free(), nor can I see it mattering if it is not set to NULL (notice that it goes out of scope with the for loop). -pd > On 7 Jun 2020, at 16:00 , Jeroen Ooms <jeroenooms at gmail.com> wrote: > > On S...
2020 Jun 07
3
[External] Re: use of the tcltk package crashes R 4.0.1 for Windows
...(s)+2, char); > > *tmp = '-'; > > strcpy(tmp+1, s); > > objv[objc++] = Tcl_NewStringObj(tmp, -1); > > free(tmp); > > } > > if (!isNull(t = VECTOR_ELT(avec, i))) > > objv[objc++] = (Tcl_Obj *) R_ExternalPtrAddr(t); > > } > > > > and I can't see how tmp can be NULL at the free(), nor can I see it mattering if it is not set to NULL (notice that it goes out of scope with the for loop). > > Right. And the calloc->Calloc change doesn't look like an iss...
2011 Feb 08
1
Compiling a Tcl extension for an R package
...age to compile correctly under Linux, Windows and OSX? (i.e. writing a configure script with the correct compile commands). Thanks, Adrian Waddell ########################### C Code (save as hello.c): #include <tcl.h> static int Hello_Cmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_SetObjResult(interp, Tcl_NewStringObj("Hello, World!", -1)); return TCL_OK; } int DLLEXPORT Hello_Init(Tcl_Interp *interp) { Tcl_CreateObjCommand(interp, "hello", Hello_Cmd, NULL, NULL); return TCL_OK; } which can be compiled (under Ubuntu 10.04) wi...
2020 Jun 07
4
[External] Re: use of the tcltk package crashes R 4.0.1 for Windows
...tmp = '-'; >>>> strcpy(tmp+1, s); >>>> objv[objc++] = Tcl_NewStringObj(tmp, -1); >>>> free(tmp); >>>> } >>>> if (!isNull(t = VECTOR_ELT(avec, i))) >>>> objv[objc++] = (Tcl_Obj *) R_ExternalPtrAddr(t); >>>> } >>>> >>>> and I can't see how tmp can be NULL at the free(), nor can I see it mattering if it is not set to NULL (notice that it goes out of scope with the for loop). >>> >>> Right. And the calloc->Calloc...
2020 Jun 07
0
[External] Re: use of the tcltk package crashes R 4.0.1 for Windows
...>>> *tmp = '-'; >>> strcpy(tmp+1, s); >>> objv[objc++] = Tcl_NewStringObj(tmp, -1); >>> free(tmp); >>> } >>> if (!isNull(t = VECTOR_ELT(avec, i))) >>> objv[objc++] = (Tcl_Obj *) R_ExternalPtrAddr(t); >>> } >>> >>> and I can't see how tmp can be NULL at the free(), nor can I see it mattering if it is not set to NULL (notice that it goes out of scope with the for loop). >> >> Right. And the calloc->Calloc change doesn'...
2020 Jun 07
0
[External] Re: use of the tcltk package crashes R 4.0.1 for Windows
...> tmp = Calloc(strlen(s)+2, char); > *tmp = '-'; > strcpy(tmp+1, s); > objv[objc++] = Tcl_NewStringObj(tmp, -1); > free(tmp); > } > if (!isNull(t = VECTOR_ELT(avec, i))) > objv[objc++] = (Tcl_Obj *) R_ExternalPtrAddr(t); > } > > and I can't see how tmp can be NULL at the free(), nor can I see it mattering if it is not set to NULL (notice that it goes out of scope with the for loop). Right. And the calloc->Calloc change doesn't look like an issue either -- just checki...
2020 Jun 07
0
[External] use of the tcltk package crashes R 4.0.1 for Windows
...>>>>> strcpy(tmp+1, s); >>>>> objv[objc++] = Tcl_NewStringObj(tmp, -1); >>>>> free(tmp); >>>>> } >>>>> if (!isNull(t = VECTOR_ELT(avec, i))) >>>>> objv[objc++] = (Tcl_Obj *) R_ExternalPtrAddr(t); >>>>> } >>>>> >>>>> and I can't see how tmp can be NULL at the free(), nor can I see it mattering if it is not set to NULL (notice that it goes out of scope with the for loop). >>>> >>>> Right. And...
2018 Oct 01
2
[PATCH nbdkit] plugins: Add scripting language version to --dump-plugin output.
...c void tcl_dump_plugin (void) { +#ifdef TCL_VERSION + printf ("tcl_version=%s\n", TCL_VERSION); +#endif + +#ifdef TCL_PATCH_LEVEL + printf ("tcl_patch_level=%s\n", TCL_PATCH_LEVEL); +#endif + if (script && proc_defined ("dump_plugin")) { int r; Tcl_Obj *cmd; -- 2.19.0.rc0
2020 Jun 07
2
[External] Re: use of the tcltk package crashes R 4.0.1 for Windows
...(s)+2, char); > > *tmp = '-'; > > strcpy(tmp+1, s); > > objv[objc++] = Tcl_NewStringObj(tmp, -1); > > free(tmp); > > } > > if (!isNull(t = VECTOR_ELT(avec, i))) > > objv[objc++] = (Tcl_Obj *) R_ExternalPtrAddr(t); > > } > > > > and I can't see how tmp can be NULL at the free(), nor can I see it > mattering if it is not set to NULL (notice that it goes out of scope with > the for loop). > > Right. And the calloc->Calloc change doesn't look...
2011 Aug 14
2
Problem installing R Commander plugin...
...mg.c:164: error: for each function it appears in.) tcltkimg.c:168: error: ?TCL_OK? undeclared (first use in this function) tcltkimg.c: In function ?CreateRplot?: tcltkimg.c:193: error: expected declaration specifiers before ?Tcl_Interp? tcltkimg.c:196: error: expected declaration specifiers before ?Tcl_Obj? tcltkimg.c:198: error: expected declaration specifiers before ?Tk_ImageType? tcltkimg.c:199: error: expected declaration specifiers before ?Tk_ImageMaster? tcltkimg.c:200: error: expected declaration specifiers before ?ClientData? tcltkimg.c:201: warning: type of ?interp? defaults to ?int? tcltkim...
2020 Jun 07
7
use of the tcltk package crashes R 4.0.1 for Windows
Hi, The following code, from the examples in ?TkWidgets , immediately crashes R 4.0.1 for Windows: --------------------- snip -------------------- library("tcltk") tt <- tktoplevel() label.widget <- tklabel(tt, text = "Hello, World!") button.widget <- tkbutton(tt, text = "Push", command = function()cat("OW!\n")) tkpack(label.widget,
2019 Sep 01
11
[nbdkit PATCH 00/10] Avoid -Wshadow
While working on can_FOO caching, at one point I got confused by whether 'readonly' meant the global set by -r or a local passed to .open(). A quick attempt to compile with -Wshadow found several other confusing points; this series gets us to the point that we can add -Wshadow to builds with --enable-gcc-warnings. Eric Blake (10): server: Avoid -Wshadow warnings guestfs: Avoid
2012 May 14
0
phyloclim could not be installed in linux - problems on tkrplot dependence
...mg.c:164: error: for each function it appears in.) tcltkimg.c:168: error: ‘TCL_OK’ undeclared (first use in this function) tcltkimg.c: In function ‘CreateRplot’: tcltkimg.c:193: error: expected declaration specifiers before ‘Tcl_Interp’ tcltkimg.c:196: error: expected declaration specifiers before ‘Tcl_Obj’ tcltkimg.c:198: error: expected declaration specifiers before ‘Tk_ImageType’ tcltkimg.c:199: error: expected declaration specifiers before ‘Tk_ImageMaster’ tcltkimg.c:200: error: expected declaration specifiers before ‘ClientData’ tcltkimg.c:192: warning: type of ‘interp’ defaults to ‘int’ tcltkim...