Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for _cgo_allocate (0.18 sec)

  1. 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)
  2. src/cmd/cgo/internal/test/callback_c_gc.c

    #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)
  3. src/cmd/cgo/doc.go

    	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) { }
    
    The extra functions here are stubs to satisfy the references in the C
    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)
Back to top