- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 212 for typemap (0.19 sec)
-
src/cmd/cgo/internal/swig/testdata/stdio/main.swig
/* A trivial example of wrapping a C library using SWIG. */ %{ #include <stdio.h> #include <stdlib.h> %} %typemap(gotype) const char * "string" %typemap(in) const char * %{ $1 = malloc($input.n + 1); memcpy($1, $input.p, $input.n); $1[$input.n] = '\0'; %} %typemap(freearg) const char * %{ free($1); %} FILE *fopen(const char *name, const char *mode); int fclose(FILE *);
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 12:00:07 UTC 2023 - 563 bytes - Viewed (0) -
pkg/typemap/map_test.go
typemap.Set(tm, &TestStruct{Field: "pointer"}) 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"}))
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Apr 17 16:38:40 UTC 2024 - 1.5K bytes - Viewed (0) -
pkg/typemap/map.go
// limitations under the License. package typemap import ( "reflect" "istio.io/istio/pkg/ptr" ) // TypeMap provides a map that holds a map of Type -> Value. There can be only a single value per type. // The value stored for a type must be of the same type as the key. type TypeMap struct { inner map[reflect.Type]any } func NewTypeMap() TypeMap { return TypeMap{make(map[reflect.Type]any)} }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Apr 17 16:38:40 UTC 2024 - 1.2K bytes - Viewed (0) -
pkg/config/schema/kubetypes/common.go
"istio.io/istio/pkg/config/schema/gvk" "istio.io/istio/pkg/ptr" "istio.io/istio/pkg/typemap" ) func MustGVRFromType[T runtime.Object]() schema.GroupVersionResource { if gk, ok := getGvk(ptr.Empty[T]()); ok { gr, ok := gvk.ToGVR(gk) if !ok { panic(fmt.Sprintf("unknown GVR for GVK %v", gk)) } return gr } if rp := typemap.Get[RegisterType[T]](registeredTypes); rp != nil { return (*rp).GetGVR() }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Apr 17 16:38:40 UTC 2024 - 2.2K bytes - Viewed (0) -
src/go/types/context.go
defer ctxt.mu.Unlock() for _, e := range ctxt.typeMap[h] { if inst == nil || Identical(inst, e.instance) { return e.instance } if debug { // Panic during development to surface any imperfections in our hash. panic(fmt.Sprintf("%s and %s are not identical", inst, e.instance)) } } ctxt.typeMap[h] = append(ctxt.typeMap[h], ctxtEntry{ orig: orig, targs: targs,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 4.4K bytes - Viewed (0) -
src/cmd/compile/internal/types2/context.go
defer ctxt.mu.Unlock() for _, e := range ctxt.typeMap[h] { if inst == nil || Identical(inst, e.instance) { return e.instance } if debug { // Panic during development to surface any imperfections in our hash. panic(fmt.Sprintf("%s and %s are not identical", inst, e.instance)) } } ctxt.typeMap[h] = append(ctxt.typeMap[h], ctxtEntry{ orig: orig, targs: targs,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 28 17:29:21 UTC 2023 - 4.3K bytes - Viewed (0) -
src/runtime/type.go
} } typehash[t.Hash] = append(tlist, t) } if md.typemap == nil { // If any of this module's typelinks match a type from a // prior module, prefer that prior type by adding the offset // to this module's typemap. tm := make(map[typeOff]*_type, len(md.typelinks)) pinnedTypemaps = append(pinnedTypemaps, tm) md.typemap = tm for _, tl := range md.typelinks {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:17:26 UTC 2024 - 12.7K bytes - Viewed (0) -
pkg/config/schema/kubeclient/common.go
"istio.io/istio/pkg/config/schema/kubetypes" "istio.io/istio/pkg/kube/informerfactory" ktypes "istio.io/istio/pkg/kube/kubetypes" "istio.io/istio/pkg/log" "istio.io/istio/pkg/ptr" "istio.io/istio/pkg/typemap" ) type ClientGetter interface { // Ext returns the API extensions client. Ext() kubeext.Interface // Kube returns the core kube client Kube() kubernetes.Interface // Dynamic client.
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Apr 17 16:38:40 UTC 2024 - 8.1K bytes - Viewed (0) -
src/internal/pkgbits/codes.go
// Note: These values are public and cannot be changed without // updating the go/types importers. const ( TypeBasic CodeType = iota TypeNamed TypePointer TypeSlice TypeArray TypeChan TypeMap TypeSignature TypeStruct TypeInterface TypeUnion TypeTypeParam ) // A CodeObj distinguishes among go/types.Object encodings. type CodeObj int
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 25 16:15:47 UTC 2022 - 1.7K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/model/schemas_test.go
} } } } func TestSchemaDeclTypes(t *testing.T) { ts := testSchema() cust := SchemaDeclType(ts, true).MaybeAssignTypeName("CustomObject") typeMap := apiservercel.FieldTypeMap("CustomObject", cust) nested, _ := cust.FindField("nested") metadata, _ := cust.FindField("metadata") expectedObjTypeMap := map[string]*apiservercel.DeclType{ "CustomObject": cust,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu May 16 20:13:14 UTC 2024 - 14K bytes - Viewed (0)