search for: c_function

Displaying 20 results from an estimated 48 matches for "c_function".

Did you mean: __function
2017 Oct 04
0
[PATCH 2/9] ocaml: Replace pattern matching { field = field } with { field }.
...t; sort); @@ -936,11 +936,10 @@ guestfs_session_close (GuestfsSession *session, GError **err) let literal = Str.regexp "\\(^\\|\n\\)[ \t]+\\([^\n]*\\)\\(\n\\|$\\)" in List.iter ( - fun ({ name = name; style = (ret, args, optargs as style); - cancellable = cancellable; c_function = c_function; - c_optarg_prefix = c_optarg_prefix; - shortdesc = shortdesc; longdesc = longdesc; - deprecated_by = deprecated_by } as f) -> + fun ({ name; style = (ret, args, optargs as style); + cancellable; c_function; c_optarg_prefix; + sho...
2017 Oct 04
11
[PATCH 0/9] build: Require OCaml >= 4.02.
Per my previous email: https://www.redhat.com/archives/libguestfs/2017-September/msg00203.html I'd like to talk about requiring a more modern version of the OCaml compiler. These commits show some of the code changes which would be possible with OCaml >= 3.12 [which it turns out we already require by accident] and also with OCaml >= 4.02. The latter is my favoured option. Rich.
2017 Mar 03
1
[PATCH] erlang: Rename 'message' to something less generic.
...ist.iter ( fun { name = name } -> - pr "ETERM *run_%s (ETERM *message);\n" name + pr "ETERM *run_%s (ETERM *args_tuple);\n" name ) (actions |> external_functions |> sort); pr "\n"; @@ -355,7 +355,7 @@ instead of erl_interface. c_function = c_function; c_optarg_prefix = c_optarg_prefix } -> pr "\n"; pr "ETERM *\n"; - pr "run_%s (ETERM *message)\n" name; + pr "run_%s (ETERM *args_tuple)\n" name; pr "{\n"; iteri ( @@ -546,11 +546,11 @@ instead...
2019 Apr 23
0
[PATCH 7/7] perl: show warnings for deprecated functions
...++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/generator/perl.ml b/generator/perl.ml index efb31077c..af19650a8 100644 --- a/generator/perl.ml +++ b/generator/perl.ml @@ -335,7 +335,7 @@ PREINIT: List.iter ( fun { name; style = (ret, args, optargs as style); - c_function; c_optarg_prefix } -> + c_function; c_optarg_prefix; deprecated_by } -> (match ret with | RErr -> pr "void\n" | RInt _ -> pr "SV *\n" @@ -444,6 +444,16 @@ PREINIT: pr " PPCODE:\n"; ); + (match deprec...
2023 Jun 27
1
[PATCH libguestfs 1/4] ocaml: Replace old enter/leave_blocking_section calls
...#include \"guestfs-utils.h\" @@ -689,12 +690,12 @@ copy_table (char * const * argv) pr "\n"; if blocking then - pr " caml_enter_blocking_section ();\n"; + pr " caml_release_runtime_system ();\n"; pr " r = %s " c_function; generate_c_call_args ~handle:"g" style; pr ";\n"; if blocking then - pr " caml_leave_blocking_section ();\n"; + pr " caml_acquire_runtime_system ();\n"; (* Free strings if we copied them above. *) List.ite...
2015 Feb 12
4
[PATCH 1/3] gobject: generate deprecation markers
...ject.ml b/generator/gobject.ml index 5b07edd..e563610 100644 --- a/generator/gobject.ml +++ b/generator/gobject.ml @@ -961,7 +961,8 @@ guestfs_session_close (GuestfsSession *session, GError **err) fun ({ name = name; style = (ret, args, optargs as style); cancellable = cancellable; c_function = c_function; c_optarg_prefix = c_optarg_prefix; - shortdesc = shortdesc; longdesc = longdesc } as f) -> + shortdesc = shortdesc; longdesc = longdesc; + deprecated_by = deprecated_by } as f) -> pr "\n"; let longdesc = Str.glo...
2013 Feb 04
1
[PATCH] generator: Add visibility to action struct
...har *text, int start, int end) (* Generate the POD documentation for guestfish. *) and generate_fish_actions_pod () = - let all_functions_sorted = - List.filter ( - fun { in_fish = in_fish; in_docs = in_docs } -> in_fish && in_docs - ) all_functions_sorted in + let fishdoc_functions_sorted = + List.filter is_documented fish_functions_sorted + in let rex = Str.regexp "C<guestfs_\\([^>]+\\)>" in @@ -895,7 +881,7 @@ Guestfish will prompt for these separately.\n\n"; match deprecation_notice ~replace_underscores:true f with | None -...
2000 Apr 26
2
Cross compiling a package for Windows on Linux
...../../library/profile/Rprofile.gnw-------- mkdir -p ../../../library/base/R cat ../../library/profile/Common.R ../../library/profile/Rprofile.gnw > ../../../library/base/R/Rprofile sed -e '/^#/d' -e '/Rsockfork/d' -e 's/F77_SUBROUTINE(\(.*\))/void * \1_();/' -e 's/C_FUNCTION(\(.*\))/void * \1();/' ../../appl/ROUTINES > ../../include/FFDecl.h sed -e '/^#/d' -e '/Rsockfork/d' -e 's/F77_SUBROUTINE(\(.*\))/ { "\1_", \1_},/' -e 's/C_FUNCTION(\(.*\))/{ "\1", \1 },/' ../../appl/ROUTINES > ../../include/FFTab.h sh...
2015 Sep 15
3
[PATCH 3/3] python: Allow bindings to be compiled with different version of libguestfs (RHBZ#1262983).
Patch to fix: https://bugzilla.redhat.com/show_bug.cgi?id=1262983 Note this won't help until the first two patches get backported to the stable branches, since <guestfs.h> won't define the necessary GUESTFS_HAVE_* macros. Rich.
2019 Jun 27
0
[PATCH 7/9] Rust bindings: Complete actions
..._functions |> sort); + (* extern C APIs *) + pr "extern \"C\" {\n"; + List.iter ( + fun ({ name = name; shortdesc = shortdesc; + style = (ret, args, optargs) } as f) -> + let cname = snake2caml name in + pr "fn %s(g: *const guestfs_h" f.c_function; + List.iter ( + fun arg -> + pr ", "; + match arg with + | Bool n -> pr "%s: c_int" n + | String (_, n) -> pr "%s: *const c_char" n + | OptString n -> pr "%s: *const c_char" n + |...
2019 Jun 27
0
Re: [PATCH 08/11] Rust bindings: Fix memory management and format the file
...t;}\n\n"; ); ) (actions |> external_functions |> sort); @@ -437,7 +565,8 @@ impl UUID { fun ({ name = name; shortdesc = shortdesc; style = (ret, args, optargs) } as f) -> let cname = snake2caml name in - pr "fn %s(g: *const guestfs_h" f.c_function; + pr " #[allow(non_snake_case)]\n"; + pr " fn %s(g: *const guestfs_h" f.c_function; List.iter ( fun arg -> pr ", "; @@ -456,7 +585,7 @@ impl UUID { | _ -> () ); if optargs <> [] then -...
1998 Jun 15
1
R-beta: fortran problems with 0.62
One of the big problems in mixing fortran and C is knowing if the various compilers/loaders need extra underscores in the names of the entry points. The 0.62 release of R, which has reverted to using fortran, seems to be broken in this respect. In particular, on a machine which does not append underscores to fortran entry points (HP-UX 10.20), there are many problems. It seems that the
2000 May 15
1
pythag missing in src/appl/ROUTINES (PR#544)
...ns)[0] = pythag(xa, xb); UNPROTECT(1); return(ans); } ------------------------------------------------------------- $ R_HOME=/usr/local/lib/R gcc -I/usr/local/lib/R/include -c pythagtry.c $ gcc -shared -o pythagtry.so pythagtry.o ----------------------------------------------------------- added: C_FUNCTION(pythag) to /usr/local/src/R-1.0.1/src/appl/ROUTINES make make install > x <- 1 > y <- 1 > sqrt(x^2 + y^2) [1] 1.414214 > is.loaded("pythag") [1] TRUE > dyn.load("pythagtry.so") > .Call("pytry", x, y) [1] 1.414214 -.-.-.-.-.-.-.-.-.-.-.-.-...
2012 Jul 14
6
[PATCH 0/6] Allow non-optargs functions to gain optional arguments.
This rather complex set of patches allow non-optargs functions to gain optional arguments, while preserving source and binary backwards compatibility. The problem is that we cannot add an optional argument to an existing function. For example, we might want to add flags to the 'lvresize' API which currently has no optional arguments.
2020 Jun 01
1
[PATCH] erlang: Port to libei for Erlang 23
...e should switch over to using - #include <ei.h> -instead of erl_interface. -*/ +#include <ei.h> #include \"guestfs.h\" #include \"guestfs-utils.h\" @@ -358,33 +354,43 @@ instead of erl_interface. fun { name; style = (ret, args, optargs as style); c_function; c_optarg_prefix } -> pr "\n"; - pr "ETERM *\n"; - pr "run_%s (ETERM *args_tuple)\n" name; + pr "int\n"; + pr "run_%s (ei_x_buff *retbuff, const char *buff, int *idx)\n" name; pr "{\n"; List.it...
2019 Jun 27
0
[PATCH 6/9] Rust bindings: Add generator of function signatures
...args; + + (* TODO: handle optargs *) + if optargs <> [] then ( + ); + + (match ret with + | RBufferOut _ -> + pr "let mut size = 0;\n" + | _ -> () + ); + + pr "\n"; + + pr "let r = unsafe { %s(self.g" f.c_function; + List.iter ( + fun arg -> + pr ", "; + match arg with + | Bool n | String (_, n) | OptString n -> pr "c_%s" n + | Int n | Int64 n -> pr "%s" n + | Pointer _ -> pr "ptr::null()" (* XXX: wha...
2023 Jun 27
4
[PATCH libguestfs 0/4] Fix ups for OCaml 5
No action required here as I have pushed this already, this is just for your information. Rich.
2019 Jun 27
4
Re: [PATCH 9/9] Rust bindings: Complete bindings
Patch 9 is a kind of dumping ground of all kinds of stuff. It may be better to spend some time with git rebase -i trying to work this into more coherent patches. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live
2019 Jul 02
16
[PATCH] Add Rust bindings
I fixed the patch I submitted before based on comments, and there are some commits which are merged or divided. So, I will re-send all the patches. Regards, Hiroyuki Katsura
2019 Jun 27
0
[PATCH 9/9] Rust bindings: Complete bindings
...;}\n\n"; ); ) (actions |> external_functions |> sort); @@ -497,7 +565,8 @@ impl UUID { fun ({ name = name; shortdesc = shortdesc; style = (ret, args, optargs) } as f) -> let cname = snake2caml name in - pr "fn %s(g: *const guestfs_h" f.c_function; + pr " #[allow(non_snake_case)]\n"; + pr " fn %s(g: *const guestfs_h" f.c_function; List.iter ( fun arg -> pr ", "; @@ -516,7 +585,7 @@ impl UUID { | _ -> () ); if optargs <> [] then -...