search for: new_object

Displaying 14 results from an estimated 14 matches for "new_object".

2003 Jan 06
3
Simple question - Machine / User relationsip
Can someone explain to me the mechanizm that Samba uses to relate Machines to Users? I am trying to set up a Samba-LDAP PDC and it seems to work OK but I get "No mapping between account names and security IDs was done." This would seem to be a simple user/group ownership/permissions thing. Now I have the following potentially pertinent ou's: People Computers Groups One
2018 Aug 06
2
SIGSEGV in R_RunWeakRefFinalizer, object allocated with Rcpp
Hi all, I'm not sure if I'm not supposed to do the following (the dyn.unload part, I mean) or this could be a bug (in R or Rcpp): ``` Rcpp::sourceCpp(code=' #include <Rcpp.h> class Object {}; //[[Rcpp::export]] SEXP new_object() { return Rcpp::XPtr<Object>(new Object()); }' ) new_object() dyn.unload(list.files(tempdir(), ".(so|dll)$", recursive=TRUE, full.names=TRUE)) gc() # segfault in R_RunWeakRefFinalizer message("This is not printed") ``` This is the backtrace I get with R 3.5.1...
2004 Apr 26
1
Segfault: .Call and classes with logical slots
Hi, the following example aiming at a class containing a logical slot segfaults under R-1.9.0 when `gctorture(on = TRUE)' is used: Code code (dummy.c): #include <Rdefines.h> SEXP foo() { SEXP ans; PROTECT(ans = NEW_OBJECT(MAKE_CLASS("test"))); SET_SLOT(ans, install("lgl"), allocVector(LGLSXP, 1)); LOGICAL(GET_SLOT(ans, install("lgl")))[0] = TRUE; UNPROTECT(1); return(ans); } R code (dummy.R): dyn.load("dummy.so") setClass("test", representation = r...
2012 Sep 15
1
Question about copying arguments in C.
...(SEXP thingysInteger) { SEXP ans, TClass, ti; if(!isInteger(thingysInteger)) error("thingysIntegermust be an integer."); if(constructThingy(INTEGER(thingysInteger)[0])) error("error in getting a thingy"); TClass = MAKE_CLASS("thingy"); PROTECT(ans = NEW_OBJECT(TClass)); // *****QUESTION STARTS HERE***** // CAN I SAY: SET_SLOT(ans, Rf_install("myInteger"), thingysInteger); // IF NOT, CAN I SAY SET_SLOT(ans, Rf_install("myInteger"), AS_INTEGER(thingysInteger)); // OR DO I NEED TO SAY PROTECT(ti = allocVec...
2018 Aug 09
0
SIGSEGV in R_RunWeakRefFinalizer, object allocated with Rcpp
...gt; Hi all, > > I'm not sure if I'm not supposed to do the following (the dyn.unload > part, I mean) or this could be a bug (in R or Rcpp): > > ``` > Rcpp::sourceCpp(code=' > #include <Rcpp.h> > class Object {}; > //[[Rcpp::export]] > SEXP new_object() { > return Rcpp::XPtr<Object>(new Object()); > }' > ) > > new_object() > dyn.unload(list.files(tempdir(), ".(so|dll)$", recursive=TRUE, full.names=TRUE)) > gc() # segfault in R_RunWeakRefFinalizer > > message("This is not printed")...
2003 Jun 23
3
FW: S4 classes, creating in C
...ms = GET_DIM(aa); m = INTEGER(adims)[0]; n = INTEGER(adims)[1]; pivot = PROTECT(NEW_INTEGER(m < n ? m : n)); F77_CALL(dgetrf)(&m, &n, REAL(aa), &m, INTEGER(pivot), &info); check_Lapack_error(info, "dtrtrf"); val = PROTECT(NEW_OBJECT(MAKE_CLASS("LUdecomposition"))); SET_SLOT(val, install("a"), aa); SET_SLOT(val, install("pivot"), pivot); UNPROTECT(3); return val; } LUdecomposition is an S4 class defined as setClass("LUdecomposition", repr...
2003 Sep 05
1
Problem with S4 slots in C code (PR#4073)
...eason = all, area = all year age 0 0 1 > #C code to do the same thing extern "C" __declspec(dllexport) SEXP __stdcall Test(void) { SEXP FLQuant, v, d1, d2, d3, d4, d5, dim, dimnames, names; //Create new S4 object PROTECT(FLQuant = NEW_OBJECT(MAKE_CLASS("FLQuant"))); //Create array for slot //Set dimensions of array PROTECT(dim = allocVector(INTSXP, 5)); INTEGER(dim)[0] = 1; INTEGER(dim)[1] = 1; INTEGER(dim)[2] = 1; INTEGER(dim)[3] = 1; INTEGER(dim)[4] = 1; //Allo...
2005 Jul 26
1
Error registering finalizer
...ProbesetGETypeTag)); } SEXP R_PDNN_newProbesetGE(unsigned count) { SEXP vntObj; SEXP vntClassDef; SEXP vntData; SEXP vntAttr; SEXP vntHandle; unsigned n = 0; PROTECT(vntClassDef = MAKE_CLASS(PROBESET_GE_CLASS_NAME)); n++; PROTECT(vntObj = NEW_OBJECT(vntClassDef)); n++; PROTECT(vntHandle = AllocateProbesetGEPtr(count)); n++; SET_SLOT(vntObj, HandleSlotSymbol, vntHandle); PROTECT(vntData = R_ExternalPtrProtected(vntHandle)); n++; PROTECT(vntAttr = NEW_INTEGER(1)); n++; INTEGER(vntAttr)[0] = count; SET_COUNT(vntData, vn...
2004 Mar 06
2
.Call: is new attribute of protected object auto-protected
Hi, I have an SEXP obj in a C function called via .Call(). The obj is protected (in fact it is an argument to .Call and therefore automatically protected). If I set an attribute of obj does the attribute become protected too? Here is an example SEXP foo(SEXP obj) { SET_NAMES(obj, NEW_CHARACTER(3)); /* are names protected or not? */ ... } Thanks, Vadim [[alternative HTML version
2007 Oct 07
1
R 2.6.0 S4 data breakage, R _data_class(), class<-, etc.
Hi, (somebody would probably yell at me for not checking 2.6.0rc, for which I can only apologize...) Our R package (snpMatrix in http://www-gene.cimr.cam.ac.uk/clayton/software/) is broken rather badly in 2.6.0 ; I have fixed most of it now so a new release is imminent; but I'd like to mention a few things, mostly to summarize my experience and hopefully the 'writing R extensions'
2010 Feb 18
3
R CMD check: OK in LINUX. Crashes in Windows!
Hi, I have followed the recommended steps for creating a package (rctest). As of now, my goal is simply to understand how various pieces fit together. The package includes: (1) C code with source in sub-directories, compiled to create a static library. (a) There is a single C-struct (dns) a simple 'matrix': {int m; int n; double *d;} (b) C code to create random matrix of a certain size.
2003 Jan 10
6
R-1.6.2 is released
I've rolled up R-1.6.2.tgz a short while ago. This is a minor upgrade, fixing an assortment of bugs. You can get it from the developer site at http://cvs.r-project.org/pub/CRAN/src/base/R-1.6.2.tgz or wait for it to be mirrored at a CRAN site near you. Binaries for various platforms will appear in due course. There is also a version split for floppies, but due to the inclusion of
2003 Jan 10
6
R-1.6.2 is released
I've rolled up R-1.6.2.tgz a short while ago. This is a minor upgrade, fixing an assortment of bugs. You can get it from the developer site at http://cvs.r-project.org/pub/CRAN/src/base/R-1.6.2.tgz or wait for it to be mirrored at a CRAN site near you. Binaries for various platforms will appear in due course. There is also a version split for floppies, but due to the inclusion of
2009 Nov 04
4
[PATCH server] Update daemons to use new QMF.
...if hasStats + update_stats(obj, type) + end + end + def update_props(obj, type) # I just sync this whole thing because there shouldn't be a lot of contention here.. synchronize do values = @cached_objects[obj.object_id.to_s] - new_object = false if values == nil @@ -318,8 +328,7 @@ class DbOmatic < Qpid::Qmf::Console # Save the agent and broker bank so that we can tell what objects # are expired when the heartbeat for them stops. - values[:broker_bank] = obj.objec...