Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 45 for sizeof (0.2 sec)

  1. src/cmd/cgo/internal/test/callback_c_gc.c

    extern void _cgo_panic(void *, int);
    extern void _cgo_allocate(void *, int);
    
    void
    callPanic(void)
    {
    	struct { const char *p; } a;
    	a.p = "panic from C";
    	crosscall2(_cgo_panic, &a, sizeof a);
    	*(int*)1 = 1;
    C
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 592 bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/test/callback_c.c

    #include <string.h>
    
    #include "_cgo_export.h"
    
    void
    callback(void *f)
    {
    	// use some stack space
    	volatile char data[64*1024];
    
    	data[0] = 0;
    	goCallback(f);
            data[sizeof(data)-1] = 0;
    }
    
    void
    callGoFoo(void)
    {
    	extern void goFoo(void);
    	goFoo();
    }
    
    void
    IntoC(void)
    {
    	BackIntoGo();
    }
    
    void
    Issue1560InC(void)
    {
    	Issue1560FromC();
    }
    C
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 933 bytes
    - Viewed (0)
  3. src/cmd/cgo/doc.go

    struct_, union_, or enum_, as in C.struct_stat.
    
    The size of any C type T is available as C.sizeof_T, as in
    C.sizeof_struct_stat.
    
    A C function may be declared in the Go file with a parameter type of
    the special name _GoString_. This function may be called with an
    ordinary Go string value. The string length, and a pointer to the
    string contents, may be accessed by calling the C functions
    
    	size_t _GoStringLen(_GoString_ s);
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Sun Mar 31 09:02:45 GMT 2024
    - 42.1K bytes
    - Viewed (0)
  4. src/cmd/cgo/internal/test/issue1435.go

    //     pthread_mutex_lock(&mu);
    //     done = all_done;
    //     pthread_mutex_unlock(&mu);
    //   }
    //   return NULL;
    // }
    //
    // void trial(int argc) {
    //   int i;
    //   nts = argc;
    //   t = calloc(nts, sizeof(pthread_t));
    //   pthread_mutex_init(&mu, NULL);
    //   for (i = 0; i < nts; i++) {
    //     pthread_create(&t[i], NULL, aFn, NULL);
    //   }
    // }
    //
    // void cleanup(void) {
    //   int i;
    //   pthread_mutex_lock(&mu);
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Jul 28 21:31:41 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  5. api/go1.5.txt

    pkg go/types, type SelectionKind int
    pkg go/types, type Signature struct
    pkg go/types, type Sizes interface { Alignof, Offsetsof, Sizeof }
    pkg go/types, type Sizes interface, Alignof(Type) int64
    pkg go/types, type Sizes interface, Offsetsof([]*Var) []int64
    pkg go/types, type Sizes interface, Sizeof(Type) int64
    pkg go/types, type Slice struct
    pkg go/types, type StdSizes struct
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Jul 30 21:14:09 GMT 2015
    - 46.6K bytes
    - Viewed (0)
  6. src/cmd/cgo/gcc.go

    	// the compiler is going to pad it by one (see issue 9401).
    	// We can't permit that, because then the size of the Go
    	// struct will not be the same as the size of the C struct.
    	// Our only option in such a case is to remove the field,
    	// which means that it cannot be referenced from Go.
    	for off > 0 && sizes[len(sizes)-1] == 0 {
    		n := len(sizes)
    		fld = fld[0 : n-1]
    		sizes = sizes[0 : n-1]
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Nov 02 16:43:23 GMT 2023
    - 97K bytes
    - Viewed (0)
  7. doc/go1.17_spec.html

    a <a href="#Run_time_panics">run-time panic</a> occurs.
    </p>
    
    <h3 id="Size_and_alignment_guarantees">Size and alignment guarantees</h3>
    
    <p>
    For the <a href="#Numeric_types">numeric types</a>, the following sizes are guaranteed:
    </p>
    
    <pre class="grammar">
    type                                 size in bytes
    
    byte, uint8, int8                     1
    uint16, int16                         2
    HTML
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 211.6K bytes
    - Viewed (0)
  8. src/bytes/buffer_test.go

    	var buf Buffer
    	n := 0
    	for r := rune(0); r < NRune; r++ {
    		size := utf8.EncodeRune(b[n:], r)
    		nbytes, err := buf.WriteRune(r)
    		if err != nil {
    			t.Fatalf("WriteRune(%U) error: %s", r, err)
    		}
    		if nbytes != size {
    			t.Fatalf("WriteRune(%U) expected %d, got %d", r, size, nbytes)
    		}
    		n += size
    	}
    	b = b[0:n]
    
    	// Check the resulting bytes
    	if !Equal(buf.Bytes(), b) {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Apr 20 01:07:29 GMT 2023
    - 18.1K bytes
    - Viewed (0)
  9. src/archive/zip/reader_test.go

    		t.Errorf("%v", err)
    		return
    	}
    
    	// For very large files, just check that the size is correct.
    	// The content is expected to be all zeros.
    	// Don't bother uncompressing: too big.
    	if ft.Content == nil && ft.File == "" && ft.Size > 0 {
    		if size != ft.Size {
    			t.Errorf("%v: uncompressed size %#x, want %#x", ft.Name, size, ft.Size)
    		}
    		r.Close()
    		return
    	}
    
    	var b bytes.Buffer
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 55.3K bytes
    - Viewed (0)
  10. src/cmd/asm/internal/asm/pseudo_test.go

    		{"DATA", "0", "expect two operands for DATA"},
    		{"DATA", "(0), 1", "expect /size for DATA argument"},
    		{"DATA", "@B(SB)/4,0", "expected '(', found B"}, // Issue 23580.
    		{"DATA", "·A(SB)/4,0", "DATA value must be an immediate constant or address"},
    		{"DATA", "·B(SB)/4,$0", ""},
    		{"DATA", "·C(SB)/5,$0", "bad int size for DATA argument: 5"},
    		{"DATA", "·D(SB)/5,$0.0", "bad float size for DATA argument: 5"},
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 3.1K bytes
    - Viewed (0)
Back to top