search for: newtype

Displaying 20 results from an estimated 29 matches for "newtype".

2006 Mar 01
1
[LLVMdev] Re: [llvm-commits] CVS: llvm/include/llvm/CodeGen/DwarfWriter.h - LLVM build problem
Hi! After commit http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20060227/032167.html : - DIE *NewType(DIE *Unit, TypeDesc *TyDesc); + DIE *DwarfWriter::NewType(CompileUnit *Unit, TypeDesc *TyDesc); and http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20060227/032227.html - DIE *DwarfWriter::NewType(CompileUnit *Unit, TypeDesc *TyDesc); + DIE *DwarfWriter::NewType(DIE *Context, TypeDes...
2010 Apr 08
1
[PATCH] Move all interaction with the config file into Sys::VirtV2V::Config
...ERR user_message(__x("No mapping found for '{type}' ". + "interface: {name}", + type => $oldtype, + name => $oldname)); + return; + } + + my $newtype = $mapping->getAttributeNode('type'); + $newtype &&= $newtype->getValue(); + my $newname = $mapping->getAttributeNode('name'); + $newname &&= $newname->getValue(); + + # Check type and name are defined for the mapping + unless (defined($new...
2009 Jul 10
0
[LLVMdev] void llvm::PATypeHolder::addRef(): Assertion `Ty && "Type Holder has a null type!"' failed.
...m::Type *) (this=0x1d7a740, ty=0x0) at /home/maurice/installation/llvm-dev/include/llvm/AbstractTypeUser.h:143 #5 0x00000000015828d8 in llvm::DerivedType::dropAllTypeUses (this=0x1d777d0) at Type.cpp:469 #6 0x0000000001584b1f in llvm::DerivedType::unlockedRefineAbstractTypeTo (this=0x1d777d0, NewType=0x1d5b050) at Type.cpp:1454 #7 0x000000000158b84c in llvm::TypeMap<llvm::PointerValType, llvm::PointerType>::RefineAbstractType (this=0x1d5afe0, Ty=0x1d777d0, OldType=0x1d77780, NewType=0x1d54190) at Type.cpp:884 #8 0x0000000001584fe2 in llvm::PointerType::refineAbstractType (this=0x1d7...
2007 Sep 24
3
Custom type
Hi. I have a small problem with the custom type I am working on. I define method ''evaluate'' which is called after all data is been collected. Here it is: module Puppet newtype(:test) do newparam(:name) do end newparam(:listen) do defaultto "silent" end def evaluate puts "evaluating..." return super.evaluate end end end The problem is that when running puppet I get: err: //default/testz/Test[1]: Failed to...
1997 Jul 31
1
R-alpha: More problems with R0.50.a1
...'f' function each time the "attr" line is stored in the "call" attribute of x. > f <- function () { x <- 2 print(x) attr(x,"call") <- match.call() print(attributes(x)) } 6) The following gives a error. How can this be solved? > "[<-.newtype" <- function(...) { NextMethod("[<-") } > f <- function () { idx <- 2 tmp <- matrix(3,ncol=4,nrow=4) class(tmp) <- "newtype" tmp[idx,] <- matrix(1,ncol=4,nrow=4)[2,] } > f() Error: Object "idx" not found. This did not work in R0.49...
2008 Sep 08
0
[LLVMdev] Problems when refining type
On Mon, Sep 8, 2008 at 2:45 PM, Scott Graham <scott.llvm at h4ck3r.net> wrote: > LLVMTypeRef a = LLVMPointerType(LLVMOpaqueType(), 0); > LLVMTypeHandleRef ha = LLVMCreateTypeHandle(a); > LLVMTypeRef atypes[1] = { LLVMResolveTypeHandle(ha) }; > LLVMRefineType(LLVMResolveTypeHandle(ha), LLVMStructType(atypes, 1, 0)); > > Can anyone explain what I'm doing wrong
2011 Jan 21
6
help writing types/provider
...ed? I''ve provided a validation for the initial_password parameter, but it only seems to fire if the parameter is there; it doesn''t get checked if the parameter is absent. ======================================================= # cat lib/puppet/type/rabbitmq_user.rb Puppet::Type.newtype(:rabbitmq_user) do @doc = "Manage RabbitMQ users" ensurable newparam(:name) do desc "The name of the user" validate do |n| raise ArgumentError, "cannot be empty" if n.empty? raise ArgumentError, "can''t contain spaces" if...
2010 Feb 09
5
[PATCH 1/6] Convert config file to XML, and translate networks/bridge for all connections
...RR user_message(__x("No mapping found for '{type}' ". + "interface: {name}", + type => $oldtype, + name => $oldnameval)); + next; + } + + my $newtype = $mapping->getAttributeNode('type'); + $newtype &&= $newtype->getValue(); + my $newname = $mapping->getAttributeNode('name'); + $newname &&= $newname->getValue(); + + # Check type and name are defined for the mapping + unless (defined($new...
2007 Mar 19
11
Parsechecking in a commit hook
This has been a much-requested feature, and is now a reality (in svn trunk): There is a new option, --ignoreimport, that will (surprisingly) ignore import statements. This is really only useful when using -- parseonly in a commit hook, and note that you''ll have to add the option to --parseonly, none of the puppet executables will add it for you. You should be able to
2008 Sep 08
3
[LLVMdev] Problems when refining type
Hi I'm using the llvm-c wrapper, and trying to build some recursive types (using released 2.3). I get an assert on trying to create a second opaque pointer type after refining a first. The first time through creating an opaque pointer type, a new type is created and returned from PointerType::get, but the second time, ValueType (the opaque type) is found in the PointerTypes map, which seems
2023 Nov 07
1
c(NA, 0+1i) not the same as c(as.complex(NA), 0+1i)?
...as not on what the outcome of as.complex(NA) should be, but rather, how I should read code like c(x, y) generally. Till now, I have thought of it like 'c(x, y)' is c(as(x, typeof(y)), y)` when "type(y) > type(x)". Basically in my mind, "coercion" in R <-> as.<newtype>(.) (or coerceVector() in C). So I tracked down the source (which admittedly has been this way for much longer than the present discussion) to see what exactly c() is doing in this case: https://github.com/r-devel/r-svn/blob/71e7480b07767f3b7d5c45a4247959aa4d83d910/src/main/bind.c#L418-L425 A...
2012 Nov 07
2
Custom Type & Invalid Parameter...
...pp_volume { ''v_puppet_test'': > ensure => present, > initsize => "1g", > aggregate => "aggr01", > spaceres => "none", > } > Type: > Puppet::Type.newtype(:netapp_volume) do > @doc = "Manage Netapp Volume creation, modification and deletion." > > apply_to_device > > ensurable do > desc "Netapp Volume resource state. Valid values are: present, absent." > > defaultto(:present) > > newv...
2010 May 17
3
Writing a properly-formed custom type (configxml)
...9;': xpath => "/entity-config/datasource[@name=''defaultDS'']", attributes => ''field-type-name=postgres72,schema-name=public'', } ... } ---- 8< ---- configxml.rb ---- 8< ---- module Puppet newtype(:configxml) do @doc = "Modify attributes of the first element matching the XPath expression in an XML file." require ''rexml/document'' require ''set'' def test_it doc = REXML::Document.new(File.open(value(:name))) # Take the first element...
2013 Jul 13
10
username/password combo for custom provider (couchbase)
Hi, I''m trying to program custom type for managing Couchbase buckets. Problem is that every RW operation to Couchbase cluster (creating, deleting, resizing bucket) requires admin privileges (username/password). Do you have any suggestion how should I pass the username/password to provider? If I make it a param, then every resource of type ''couchbucket'' will need to
2010 Feb 15
3
My first type/provider - does nothing...
Hi list, i tried to write my first type and provider that should create logical volumes. Seems like i''m missing something as i get nothing when i use it: No errors and no logical volume :-( type/logicalvolume.rb: ================= Puppet::Type.newtype(:logicalvolume) do @doc = "Manage logical volumes" ensurable newparam(:lvname) do desc "The logcal volume''s name" validate do |value| unless value =~ /^[a-z0-9]+/ raise ArgumentError , "%s is not a valid lv...
2023 Nov 08
1
c(NA, 0+1i) not the same as c(as.complex(NA), 0+1i)?
...should be, but rather, how I should read code like c(x, y) generally. Till > > now, I have thought of it like 'c(x, y)' is c(as(x, typeof(y)), y)` when > > "type(y) > type(x)". Basically in my mind, "coercion" in R <-> > > as.<newtype>(.) (or coerceVector() in C). > > > So I tracked down the source (which admittedly has been this way for much > > longer than the present discussion) to see what exactly c() is doing in > > this case: > > >https://github.com/r-devel/r-svn/blob/...
2023 Nov 09
1
c(NA, 0+1i) not the same as c(as.complex(NA), 0+1i)?
..., but rather, how I should read code like c(x, y) generally. Till >> > now, I have thought of it like 'c(x, y)' is c(as(x, typeof(y)), y)` when >> > "type(y) > type(x)". Basically in my mind, "coercion" in R <-> >> > as.<newtype>(.) (or coerceVector() in C). >> >> > So I tracked down the source (which admittedly has been this way for much >> > longer than the present discussion) to see what exactly c() is doing in >> > this case: >> >> >https://gi...
2007 Nov 08
1
Parity between native types and defined types
...I can do this: define backup_ninja::config(blah, baz) { ... } But that''s not much use to me, as a defined type just isn''t going to cut the mustard -- I''m after a parsed file type. When I try to do this, instead (in a file named backup_ninja::config.rb): Puppet::Type.newtype(''backup_ninja::config'') do ... end and this in site.pp: node ''hussy'' { backup_ninja::config { ''/tmp/bn.conf'': loglevel => 3, usecolors => false, reportemail => "mpalmer@hussy.hezmatt.org" } } I get...
2009 Sep 10
1
trouble with custom type on 0.24.8
...s not working. My node.pp, init.pp for the module, and custom type are listed below. Any ideas? node ''host.fqdn'' inherits basenode { include zypper zypper_repo { "test": } } init.pp for zypper module: class zypper { } zypper_repo.rb: module Puppet newtype(:zypper_repo) do @doc = "Ensure that the given repo is defined on the system, and add it if not present." ensurable newparam(:name) do desc "The name of the repository"...
2010 Feb 12
11
[PATCH 1/9] Convert config file to XML, and translate networks/bridge for all connections
...RR user_message(__x("No mapping found for '{type}' ". + "interface: {name}", + type => $oldtype, + name => $oldnameval)); + next; + } + + my $newtype = $mapping->getAttributeNode('type'); + $newtype &&= $newtype->getValue(); + my $newname = $mapping->getAttributeNode('name'); + $newname &&= $newname->getValue(); + + # Check type and name are defined for the mapping + unless (defined($new...