Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for copyValue (0.22 sec)

  1. src/encoding/xml/read.go

    			val.SetLen(n)
    			return err
    		}
    		return nil
    	}
    
    	if val.Type() == attrType {
    		val.Set(reflect.ValueOf(attr))
    		return nil
    	}
    
    	return copyValue(val, []byte(attr.Value))
    }
    
    var (
    	attrType            = reflect.TypeFor[Attr]()
    	unmarshalerType     = reflect.TypeFor[Unmarshaler]()
    	unmarshalerAttrType = reflect.TypeFor[UnmarshalerAttr]()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:04:28 UTC 2023
    - 22.4K bytes
    - Viewed (0)
  2. src/encoding/xml/marshal_test.go

    	want := "<object2></object2>"
    	if buf.String() != want {
    		t.Errorf("enc.EncodeToken: expected %q; got %q", want, buf.String())
    	}
    }
    
    // Issue 16158. Decoder.unmarshalAttr ignores the return value of copyValue.
    func TestIssue16158(t *testing.T) {
    	const data = `<foo b="HELLOWORLD"></foo>`
    	err := Unmarshal([]byte(data), &struct {
    		B byte `xml:"b,attr,omitempty"`
    	}{})
    	if err == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 18:46:41 UTC 2024
    - 66K bytes
    - Viewed (0)
  3. platforms/jvm/language-java/src/main/java/org/gradle/external/javadoc/internal/MultilineMultiValueJavadocOptionFileOption.java

        public JavadocOptionFileOptionInternal<List<List<String>>> duplicate() {
            List<List<String>> copyValues = new ArrayList<>();
            for (List<String> occurrence : getValue()) {
                copyValues.add(Lists.newArrayList(occurrence));
            }
            return new MultilineMultiValueJavadocOptionFileOption(option, copyValues, joinBy);
        }
    
        @Override
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Dec 11 13:37:56 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  4. src/net/http/http_test.go

    		"j": {"1", "2"},
    		"m": nil,
    	}
    	for i := 0; i < b.N; i++ {
    		dst := url.Values{"a": {"b"}, "b": {"2"}, "c": {"3"}, "d": {"4"}, "j": nil, "m": {"x"}}
    		copyValues(dst, src)
    		if valuesCount = len(dst["a"]); valuesCount != 6 {
    			b.Fatalf(`%d items in dst["a"] but expected 6`, valuesCount)
    		}
    	}
    	if valuesCount == 0 {
    		b.Fatal("Benchmark wasn't run")
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 18:18:19 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  5. src/net/http/request.go

    		res.requestTooLarge()
    	}
    	l.err = &MaxBytesError{l.i}
    	return n, l.err
    }
    
    func (l *maxBytesReader) Close() error {
    	return l.r.Close()
    }
    
    func copyValues(dst, src url.Values) {
    	for k, vs := range src {
    		dst[k] = append(dst[k], vs...)
    	}
    }
    
    func parsePostForm(r *Request) (vs url.Values, err error) {
    	if r.Body == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 49.4K bytes
    - Viewed (0)
  6. src/runtime/map.go

    	offset := uint8(r >> h.B & (abi.MapBucketCount - 1))
    	if h.B == 0 {
    		copyValues(t, h, (*bmap)(h.buckets), s, offset)
    		return
    	}
    	arraySize := int(bucketShift(h.B))
    	buckets := h.buckets
    	for i := 0; i < arraySize; i++ {
    		bucket := (i + r) & (arraySize - 1)
    		b := (*bmap)(add(buckets, uintptr(bucket)*uintptr(t.BucketSize)))
    		copyValues(t, h, b, s, offset)
    	}
    
    	if h.growing() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 57.6K bytes
    - Viewed (0)
Back to top