- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 58 for setstruct (0.2 sec)
-
src/cmd/cgo/internal/test/test.go
*x = 1; } void setintptr(intptr x) { *x = 1; } void setvoidptr(void *x) { *(int*)x = 1; } typedef struct Struct Struct; struct Struct { int *P; }; void setstruct(Struct s) { *s.P = 1; } // issue 11925 // Structs with zero-length trailing fields are now padded by the Go compiler. struct a11925 { int i; char a[0]; char b[0]; };
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 15:50:06 UTC 2024 - 48.5K bytes - Viewed (0) -
pkg/typemap/map_test.go
typemap.Set[TestInterface[string]](tm, TestStruct{Field: "interface"}) assert.Equal(t, typemap.Get[int](tm), ptr.Of(1)) assert.Equal(t, typemap.Get[int32](tm), ptr.Of(int32(2))) assert.Equal(t, typemap.Get[string](tm), ptr.Of("string")) assert.Equal(t, typemap.Get[*TestStruct](tm), ptr.Of(&TestStruct{Field: "pointer"})) assert.Equal(t, typemap.Get[TestInterface[string]](tm), ptr.Of(TestInterface[string](TestStruct{Field: "interface"})))
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Apr 17 16:38:40 UTC 2024 - 1.5K bytes - Viewed (0) -
src/cmd/compile/internal/types/type.go
if fieldsHasShape(allParams) { t.SetHasShape(true) } return t } // NewStruct returns a new struct with the given fields. func NewStruct(fields []*Field) *Type { t := newType(TSTRUCT) t.setFields(fields) if fieldsHasShape(fields) { t.SetHasShape(true) } for _, f := range fields { if f.Type.NotInHeap() { t.SetNotInHeap(true) break } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:29:45 UTC 2024 - 49.5K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/printers/json_test.go
"k8s.io/apimachinery/pkg/util/json" "k8s.io/client-go/kubernetes/scheme" ) var testData = TestStruct{ TypeMeta: metav1.TypeMeta{APIVersion: "foo/bar", Kind: "TestStruct"}, Key: "testValue", Map: map[string]int{"TestSubkey": 1}, StringList: []string{"a", "b", "c"}, IntList: []int{1, 2, 3}, } type TestStruct struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"`
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:46:12 UTC 2023 - 4K bytes - Viewed (0) -
pkg/config/model_test.go
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Apr 12 17:37:32 UTC 2024 - 7.9K bytes - Viewed (0) -
src/unique/handle_test.go
testHandle[testStringStruct](t, testStringStruct{"x"}) testHandle[testStringStructArrayStruct](t, testStringStructArrayStruct{ s: [2]testStringStruct{testStringStruct{"y"}, testStringStruct{"z"}}, }) testHandle[testStruct](t, testStruct{0.5, "184"}) } func testHandle[T comparable](t *testing.T, value T) { name := reflect.TypeFor[T]().Name() t.Run(fmt.Sprintf("%s/%#v", name, value), func(t *testing.T) { t.Parallel()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 18:14:07 UTC 2024 - 2.5K bytes - Viewed (0) -
analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/symbols/KtFirDestructuringDeclarationSymbol.kt
override val analysisSession: KaFirSession, ) : KaDestructuringDeclarationSymbol(), KaFirSymbol<FirVariableSymbol<*>> { init { require(firSymbol.name == SpecialNames.DESTRUCT) } override val psi: KtDestructuringDeclaration get() = withValidityAssertion { when (val psi = firSymbol.fir.psi) { is KtDestructuringDeclaration -> psi
Registered: Wed Jun 12 09:53:16 UTC 2024 - Last Modified: Tue Jun 11 15:45:42 UTC 2024 - 3.3K bytes - Viewed (0) -
src/unique/clone_test.go
testCloneSeq[testStringArray](t, cSeq(0, 2*goarch.PtrSize, 4*goarch.PtrSize)) testCloneSeq[testStringStruct](t, cSeq(0)) testCloneSeq[testStringStructArrayStruct](t, cSeq(0, 2*goarch.PtrSize)) testCloneSeq[testStruct](t, cSeq(8)) } func cSeq(stringOffsets ...uintptr) cloneSeq { return cloneSeq{stringOffsets: stringOffsets} } func testCloneSeq[T any](t *testing.T, want cloneSeq) { typName := reflect.TypeFor[T]().Name()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 18:14:07 UTC 2024 - 1K bytes - Viewed (0) -
src/cmd/compile/internal/types/kind_string.go
_ = x[TUINTPTR-11] _ = x[TCOMPLEX64-12] _ = x[TCOMPLEX128-13] _ = x[TFLOAT32-14] _ = x[TFLOAT64-15] _ = x[TBOOL-16] _ = x[TPTR-17] _ = x[TFUNC-18] _ = x[TSLICE-19] _ = x[TARRAY-20] _ = x[TSTRUCT-21] _ = x[TCHAN-22] _ = x[TMAP-23] _ = x[TINTER-24] _ = x[TFORW-25] _ = x[TANY-26] _ = x[TSTRING-27] _ = x[TUNSAFEPTR-28] _ = x[TIDEAL-29] _ = x[TNIL-30] _ = x[TBLANK-31] _ = x[TFUNCARGS-32]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jan 26 21:56:38 UTC 2023 - 1.6K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/cel/value_test.go
t.Errorf("got %v, wanted {'Test': 12u, 'Check': 34u}", mpStrUint) } tstStr, err := mv.ConvertToNative(reflect.TypeOf(&tstStruct{})) if err != nil { t.Fatal(err) } if !reflect.DeepEqual(tstStr, &tstStruct{ Test: uint64(12), Check: uint64(34), }) { t.Errorf("got %v, wanted tstStruct{Test: 12u, Check: 34u}", tstStr) } } func TestMapValueEqual(t *testing.T) { mv := NewMapValue()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 10 22:05:55 UTC 2022 - 10.4K bytes - Viewed (0)