search for: error_return

Displaying 8 results from an estimated 8 matches for "error_return".

2012 Jan 25
2
[PATCH 1/2] gobject: Allow RConstOptString to return an error
RConstOptString cannot return an error in the C api. This makes it a special case for the GObject api, as all other return types have a corresponding GError **err argument to return an error. This change removes this special case, and includes the possibility of an error return in the API. An error is indicated by setting *err to a non-NULL value. This change is in preparation for adding a close
2006 Feb 16
3
Rf_errorcall - translate to Pascal
Hello! I (try to) convert the external R header files to Pascal (Delphi). At one place I stumbled over a macro that uses a method that is not declared in a LGPL header file: In Rinternals.h: #define error_return(msg) { Rf_error(msg); return R_NilValue; } #define errorcall_return(cl,msg){ Rf_errorcall(cl, msg); return R_NilValue; } ~~~~~~~~ In Error.h: void Rf_error(const char *, ...); [Rf_errorcall is not declared here, would be something like:...
2015 Nov 24
0
Custom C finalizers for .Call
...ion, which of course DOES terminate execution. I believe Rf_error() does also, but I really wish it was explicitly stated one way or the other. Grepping the R source, I never did find where Rf_error() is actually implemented. What am I missing? In src/include/Rinternals.h, the implementation of error_return() first calls Rf_error(msg) and then does a separate "return R_NilValue" in the next statement. So you might think that Rf_error() must NOT terminate execution, otherwise why the extra return statement? But it also has a comment: /* return(.) NOT reached : for -Wall */ Meaning that...
2015 Nov 23
4
Custom C finalizers for .Call
WRE explains that R_alloc() can be used to allocate memory which automatically gets released by R at the end of a .C, .Call or .External, even in the case of an error or interruption. This is a really great feature to prevent memory leaks. I was wondering if there is a way to extend this mechanism to allow for automatically running UNPROTECT and custom finalizers at the end of a .Call as well.
2007 Apr 18
0
[PATCH 20/21] i386 Ldt cleanups 3
...>sem); + size = pc->ldt_pages*PAGE_SIZE; if (size > bytecount) size = bytecount; err = 0; - if (copy_to_user(ptr, mm->context.ldt, size)) + if (copy_to_user(ptr, pc->ldt, size)) err = -EFAULT; - up(&mm->context.sem); + up(&pc->sem); if (err < 0) goto error_return; if (size != bytecount) { @@ -176,10 +181,11 @@ static int read_default_ldt(void __user static int write_ldt(void __user * ptr, unsigned long bytecount, int oldmode) { - struct mm_struct * mm = current->mm; + mm_context_t *pc = &current->mm->context; __u32 entry_1, entry_2;...
2007 Apr 18
0
[PATCH 20/21] i386 Ldt cleanups 3
...>sem); + size = pc->ldt_pages*PAGE_SIZE; if (size > bytecount) size = bytecount; err = 0; - if (copy_to_user(ptr, mm->context.ldt, size)) + if (copy_to_user(ptr, pc->ldt, size)) err = -EFAULT; - up(&mm->context.sem); + up(&pc->sem); if (err < 0) goto error_return; if (size != bytecount) { @@ -176,10 +181,11 @@ static int read_default_ldt(void __user static int write_ldt(void __user * ptr, unsigned long bytecount, int oldmode) { - struct mm_struct * mm = current->mm; + mm_context_t *pc = &current->mm->context; __u32 entry_1, entry_2;...
2012 Jan 17
3
GObject bindings
This is the first iteration of the GObject bindings. I have 'kicked the tyres' on these, meaning I have ensured that a bunch of basic manual tests work as expected. I'm in the process of adding more comprehensive tests. Here's an example simple javascript program which uses these bindings: === const Guestfs = imports.gi.Guestfs; print('Starting'); var g = new
2012 Jan 20
11
[PATCH 01/10] Revert "Revert "generator: Add CamelName flag""
This reverts commit 3f6ca541c7b24d4c86688a509582cb41a7e0078c. The original commit was reverted prematurely. --- generator/generator_actions.ml | 10 +++++----- generator/generator_checks.ml | 5 +++++ generator/generator_types.ml | 3 +++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml index