Displaying 6 results from an estimated 6 matches for "_nbdkit_debug".
Did you mean:
nbdkit_debug
2020 Aug 18
2
Re: [PATCH nbdkit 1/9] server: Add libnbdkit.so.
On 8/18/20 8:53 AM, Richard W.M. Jones wrote:
> On Tue, Aug 18, 2020 at 07:48:43AM -0500, Eric Blake wrote:
>>> +extern int nbdkit_main (int argc, char *argv[]);
>>
>> A bit odd to declare this in a .c; but I don't see any existing
>> decent .h to put it in, nor is it worth adding a new one just for
>> this. So it is fine right here.
>
> Yup, better
2020 Aug 19
0
Re: [PATCH nbdkit 1/9] server: Add libnbdkit.so.
...oid)
{
int (*_nbdkit_parse_int) (const char *what,
const char *str,
int *r) =
GetProcAddress (GetModuleHandle (NULL), "nbdkit_parse_int");
fprintf (stderr, "nbdkit_parse_int addr = %p\n", _nbdkit_parse_int);
void (*_nbdkit_debug) (const char *msg, ...) =
GetProcAddress (GetModuleHandle (NULL), "nbdkit_debug");
_nbdkit_debug ("calling nbdkit_debug now ...");
}
and on loading this plugin into server/nbdkit.exe:
nbdkit_parse_int addr = 000000000040BD40
nbdkit: debug: calling nbdkit_debug now ...
S...
2020 Apr 10
0
[PATCH nbdkit UNFINISHED] Add the ability to write plugins in golang.
...SUCH DAMAGE.
+ */
+
+package nbdkit
+
+/*
+#cgo pkg-config: nbdkit
+#cgo LDFLAGS: -Wl,--unresolved-symbols=ignore-in-object-files
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#define NBDKIT_API_VERSION 2
+#include <nbdkit-plugin.h>
+
+// cgo cannot call varargs functions.
+void
+_nbdkit_debug (const char *s)
+{
+ nbdkit_debug ("%s", s);
+}
+
+*/
+import "C"
+
+func Debug(s string) {
+ C._nbdkit_debug(C.CString(s))
+}
diff --git a/plugins/golang/test/init.go b/plugins/golang/test/init.go
new file mode 100644
index 00000000..bfb02f62
--- /dev/null
+++ b/plugins/golang...
2020 Apr 21
2
[PATCH nbdkit v2] Add the ability to write plugins in golang.
...IGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+package nbdkit
+
+/*
+#cgo pkg-config: nbdkit
+
+#define NBDKIT_API_VERSION 2
+#include <nbdkit-plugin.h>
+
+// cgo cannot call varargs functions.
+void
+_nbdkit_debug (const char *s)
+{
+ nbdkit_debug ("%s", s);
+}
+
+// cgo cannot call varargs functions.
+void
+_nbdkit_error (const char *s)
+{
+ nbdkit_error ("%s", s);
+}
+*/
+import "C"
+import "syscall"
+
+// Utility functions.
+
+func Debug(s string) {
+ C._nbdkit_de...
2020 Apr 10
3
[PATCH nbdkit UNFINISHED] Add the ability to write plugins in golang.
Sorry Dan, but I really do dislike golang with a passion :-)
Here is a patch that allows you to write nbdkit plugins in golang. As
with C, OCaml and Rust, you can write a plugin in Go which compiles
directly to a .so file that can be loaded into golang, so in that
sense it works completely differently from scripting language plugins
like Perl and Python where there's an
2020 Apr 23
2
Re: [PATCH nbdkit v2] Add the ability to write plugins in golang.
...IGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+package nbdkit
+
+/*
+#cgo pkg-config: nbdkit
+
+#define NBDKIT_API_VERSION 2
+#include <nbdkit-plugin.h>
+
+// cgo cannot call varargs functions.
+void
+_nbdkit_debug (const char *s)
+{
+ nbdkit_debug ("%s", s);
+}
+
+// cgo cannot call varargs functions.
+void
+_nbdkit_error (const char *s)
+{
+ nbdkit_error ("%s", s);
+}
+*/
+import "C"
+import "syscall"
+
+// Utility functions.
+
+func Debug(s string) {
+ C._nbdkit_de...