Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 49 for void (0.15 sec)

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

    #include <stdint.h>
    #include <stdio.h>
    #include <stdlib.h>
    
    /* Test calling panic from C.  This is what SWIG does.  */
    
    extern void crosscall2(void (*fn)(void *, int), void *, int);
    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/doc.go

    _cgo_main.c:
    
    	int main() { return 0; }
    	void crosscall2(void(*fn)(void*), void *a, int c, uintptr_t ctxt) { }
    	uintptr_t _cgo_wait_runtime_init_done(void) { return 0; }
    	void _cgo_release_context(uintptr_t ctxt) { }
    	char* _cgo_topofstack(void) { return (char*)0; }
    	void _cgo_allocate(void *a, int c) { }
    	void _cgo_panic(void *a, int c) { }
    	void _cgo_reginit(void) { }
    
    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)
  3. src/cmd/cgo/internal/test/gcc68255/c.h

    // Copyright 2015 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    C
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 184 bytes
    - Viewed (0)
  4. src/cmd/cgo/internal/test/issue27054/egl.h

    // Copyright 2018 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // This is the relevant part of EGL/egl.h.
    
    typedef void *EGLDisplay;
    C
    - Registered: Tue Mar 26 11:13:08 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 255 bytes
    - Viewed (0)
  5. src/cmd/cgo/internal/test/callback.go

    // license that can be found in the LICENSE file.
    
    package cgotest
    
    /*
    void callback(void *f);
    void callGoFoo(void);
    void callGoStackCheck(void);
    void callPanic(void);
    int callGoReturnVal(void);
    int returnAfterGrow(void);
    int returnAfterGrowFromGo(void);
    void callGoWithString(void);
    */
    import "C"
    
    import (
    	"path"
    	"runtime"
    	"strings"
    	"sync"
    	"testing"
    	"unsafe"
    )
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 111.5K bytes
    - Viewed (0)
  6. src/cmd/cgo/internal/test/callback_c_gccgo.c

    //go:build gccgo
    
    #include "_cgo_export.h"
    #include <stdint.h>
    #include <stdio.h>
    #include <stdlib.h>
    
    /* Test calling panic from C.  This is what SWIG does.  */
    
    extern void _cgo_panic(const char *);
    extern void *_cgo_allocate(size_t);
    
    void
    callPanic(void)
    {
    	_cgo_panic("panic from C");
    C
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 452 bytes
    - Viewed (0)
  7. src/cmd/cgo/gcc.go

    		used[f.Name] = true
    	}
    
    	if !*godefs {
    		for cid, goid := range ident {
    			if token.Lookup(goid).IsKeyword() {
    				// Avoid keyword
    				goid = "_" + goid
    
    				// Also avoid existing fields
    				for _, exist := used[goid]; exist; _, exist = used[goid] {
    					goid = "_" + goid
    				}
    
    				used[goid] = true
    				ident[cid] = goid
    			}
    		}
    	}
    
    	anon := 0
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Nov 02 16:43:23 GMT 2023
    - 97K bytes
    - Viewed (0)
  8. src/cmd/cgo/internal/test/issue1435.go

    // pthread_t *t = NULL;
    // pthread_mutex_t mu;
    // int nts = 0;
    // int all_done = 0;
    //
    // static void *aFn(void *vargp) {
    //   int done = 0;
    //   while (!done) {
    //     usleep(100);
    //     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));
    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)
  9. src/cmd/cgo/internal/test/issue24161e0/main.go

      static CFDataRef SecKeyCreateSignature(SecKeyRef key, SecKeyAlgorithm algorithm, CFDataRef dataToSign, CFErrorRef *error){return NULL;}
      #define kSecKeyAlgorithmECDSASignatureDigestX962SHA1 foo()
      static SecKeyAlgorithm foo(void){return NULL;}
    #endif
    */
    import "C"
    import "testing"
    
    func f1() {
    	C.SecKeyCreateSignature(0, C.kSecKeyAlgorithmECDSASignatureDigestX962SHA1, 0, nil)
    }
    
    Go
    - Registered: Tue Mar 26 11:13:08 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 919 bytes
    - Viewed (0)
  10. src/cmd/cgo/internal/swig/testdata/stdio/main.go

    // This file is here just to cause problems.
    // main.swig turns into a file also named main.go.
    // Make sure cmd/go keeps them separate
    // when both are passed to cgo.
    
    package main
    
    //int F(void) { return 1; }
    import "C"
    import (
    	"fmt"
    	"os"
    )
    
    func F() int { return int(C.F()) }
    
    func main() {
    	if x := int(C.F()); x != 1 {
    		fatal("x = %d, want 1", x)
    	}
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:07 GMT 2023
    - 975 bytes
    - Viewed (0)
Back to top