search for: proc_defined

Displaying 3 results from an estimated 3 matches for "proc_defined".

2018 Jul 01
2
[PATCH nbdkit] Add Tcl plugin, for writing plugins in Tcl.
...cannot initialize Tcl interpreter: %s", + 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, T...
2018 Oct 01
2
[PATCH nbdkit] plugins: Add scripting language version to --dump-plugin output.
...VERSION_TEENY + printf (".%d", RUBY_API_VERSION_TEENY); +#endif +#endif + printf ("\n"); +#endif + if (!script) return; diff --git a/plugins/tcl/tcl.c b/plugins/tcl/tcl.c index b814195..b30fefd 100644 --- a/plugins/tcl/tcl.c +++ b/plugins/tcl/tcl.c @@ -95,6 +95,14 @@ proc_defined (const char *name) static 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&q...
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