search for: r_cfinalizer_t

Displaying 5 results from an estimated 5 matches for "r_cfinalizer_t".

2005 Jul 26
1
Error registering finalizer
...eSlotSymbol, vntHandle); PROTECT(vntData = R_ExternalPtrProtected(vntHandle)); n++; PROTECT(vntAttr = NEW_INTEGER(1)); n++; INTEGER(vntAttr)[0] = count; SET_COUNT(vntData, vntAttr); >>>>> Problem comes here <<<<<< R_RegisterCFinalizer(vntData, (R_CFinalizer_t)ProbesetGE_finalizer); UNPROTECT(n); return vntObj; } Thanks for any pointers... ---------------------------------------------------------- SIGSIG -- signature too long (core dumped)
2001 Jul 10
1
Object finalization
I see some code in R to attach finalizers to external pointer references (Register[C]Finalizer). Anyone have an example of how to code the finalizer? R_RegisterCFinalizer accepts a C function, but I can't see how to get it to operate on the pointer, since the pointer is not passed to the function when its called. RegisterFinalizer takes an R closure, but how is it called from R (tried
2013 May 24
1
Problem with Rboolean in c++ code
...boolean.cpp:21:46: error: invalid conversion from ?int? to ?Rboolean? [-fpermissive] In file included from /usr/share/R/include/Rdefines.h:29:0, from rboolean.cpp:4: /usr/share/R/include/Rinternals.h:764:6: error: initializing argument 3 of ?void R_RegisterCFinalizerEx(SEXP, R_CFinalizer_t, Rboolean)? [-fpermissive] make: *** [rboolean.o] Error 1 I have managed to reduce the problem to the example below: ===== foo.cpp ===== #include <R.h> #include <Rdefines.h> void foo() { Rboolean b = TRUE; } ================== With the extension .cpp this generates the error a...
2002 Nov 09
1
Calling function with proto in Rinternals.h
(Tried this query on r-help with no luck, maybe someone here can help?) I would like to call the 'RFinalizerEx' function that appears in Rinternals.h using ".Call". It worked for me in the past, but now I get an error message something like: 'call function name not in call table'. I'm using the 1.6.1 rpm from CRAN. Anyone know what's going on? Thanks. Tim --
2007 Feb 25
3
R/C++/memory leaks
Dear all, I have wrapped a C++ function in an R package. I allocate/deallocate memory using C++ 'new' and 'delete'. In order to allow user interrupts without memory leaks I've moved all the delete statements required after an interrupt to a separate C++ function freeMemory(), which is called using on.exit() just before the .C() call. I am concerned about the