Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Android/build/build/soong/sh/   (Android Betriebssystem Version 17©)  Datei vom 26.5.2026 mit Größe 2 kB image not shown  

Quelle  sh_enc.go   Sprache: unbekannt

 
Spracherkennung für: .go vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

// Code generated by go run gob_gen.go; DO NOT EDIT.

package sh

import (
 "android/soong/android"
 "bytes"
 "fmt"
 "github.com/google/blueprint/gobtools"
 "github.com/google/blueprint/proptools"
 "reflect"
)

// begin of sh_binary.go
func init() {
 ShBinaryInfoGobRegId = gobtools.RegisterType(func() gobtools.CustomDec { return new(ShBinaryInfo) })
}

func (r ShBinaryInfo) Encode(ctx gobtools.EncContext, buf *bytes.Buffer) error {
 var err error

 if err = gobtools.EncodeString(buf, r.SubDir); err != nil {
  return err
 }

 if err = gobtools.EncodeInterface(ctx, buf, r.OutputFile); err != nil {
  return err
 }

 if r.Symlinks == nil {
  if err = gobtools.EncodeInt(buf, -1); err != nil {
   return err
  }
 } else {
  if err = gobtools.EncodeInt(buf, len(r.Symlinks)); err != nil {
   return err
  }
  for val1 := 0; val1 < len(r.Symlinks); val1++ {
   if err = gobtools.EncodeString(buf, r.Symlinks[val1]); err != nil {
    return err
   }
  }
 }
 return err
}

func (r ShBinaryInfo) CustomHash(hasher *proptools.Hasher) error {
 hasher.WriteString(":sh.ShBinaryInfo")
 hasher.WriteInt(3)
 hasher.WriteString(":.string")
 hasher.WriteString(r.SubDir)
 hasher.WriteString(":sh.android.Path")
 val1 := r.OutputFile == nil
 if val1 {
  hasher.WriteByte(0)
 } else {
  if v := reflect.ValueOf(r.OutputFile); v.Kind() == reflect.Ptr {
   if v.IsNil() {
    panic(fmt.Errorf("nil pointer is not supported in interface"))
   } else {
    val2 := r.OutputFile == nil
    if val2 {
     hasher.WriteByte(0)
    } else {
     val3 := func(hasher *proptools.Hasher) error { return r.OutputFile.(proptools.CustomHash).CustomHash(hasher) }
     if err := proptools.HashReference(hasher, uintptr(v.Pointer()), val3); err != nil {
      return err
     }
    }
   }
  } else {
   r.OutputFile.(proptools.CustomHash).CustomHash(hasher)
  }
 }
 hasher.WriteString(":.[]string")
 hasher.WriteInt(len(r.Symlinks))
 for val4 := 0; val4 < len(r.Symlinks); val4++ {
  hasher.WriteString(":.string")
  hasher.WriteString(r.Symlinks[val4])
 }
 return nil
}

func (r *ShBinaryInfo) Decode(ctx gobtools.EncContext, buf *bytes.Reader) error {
 var err error

 err = gobtools.DecodeString(buf, &r.SubDir)
 if err != nil {
  return err
 }

 if val3, err := gobtools.DecodeInterface(ctx, buf); err != nil {
  return err
 } else if val3 == nil {
  r.OutputFile = nil
 } else {
  r.OutputFile = val3.(android.Path)
 }

 var val5 int
 err = gobtools.DecodeInt(buf, &val5)
 if err != nil {
  return err
 }
 if val5 != -1 {
  r.Symlinks = make([]string, val5)
  for val6 := 0; val6 < int(val5); val6++ {
   err = gobtools.DecodeString(buf, &r.Symlinks[val6])
   if err != nil {
    return err
   }
  }
 }

 return err
}

var ShBinaryInfoGobRegId int16

func (r ShBinaryInfo) GetTypeId() int16 {
 return ShBinaryInfoGobRegId
}

// end of sh_binary.go

[Dauer der Verarbeitung: 0.2 Sekunden, vorverarbeitet 2026-06-28]