- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 50 for Char (0.05 sec)
-
src/cmd/cgo/internal/testerrors/testdata/issue42580.go
// Issue 42580: cmd/cgo: shifting identifier position in ast package cgotest // typedef int (*intFunc) (); // // char* strarg = ""; // // int func_with_char(char* arg, void* dummy) // {return 5;} // // int* get_arr(char* arg, void* dummy) // {return NULL;} import "C" import "unsafe" // Test variables var ( checkedPointer = []byte{1}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 1.3K bytes - Viewed (0) -
src/cmd/cgo/internal/testcshared/testdata/main1.c
#include <stdint.h> #include <stdio.h> #include <dlfcn.h> int check_int8(void* handle, const char* fname, int8_t want) { int8_t (*fn)(); fn = (int8_t (*)())dlsym(handle, fname); if (!fn) { fprintf(stderr, "ERROR: missing %s: %s\n", fname, dlerror()); return 1; } signed char ret = fn(); if (ret != want) { fprintf(stderr, "ERROR: %s=%d, want %d\n", fname, ret, want); return 1; }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 1.7K bytes - Viewed (0) -
src/cmd/cgo/internal/testerrors/ptr_test.go
c: `#include <stdlib.h> char **f14a() { return malloc(sizeof(char*)); } void f14b(char **p) {}`, body: `p := C.f14a(); *p = new(C.char); C.f14b(p)`, fail: true, expensive: true, }, { // Storing a pinned Go pointer into C memory should succeed. name: "barrierpinnedok", c: `#include <stdlib.h> char **f14a2() { return malloc(sizeof(char*)); } void f14b2(char **p) {}`,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 03 16:07:49 UTC 2023 - 21.2K bytes - Viewed (0) -
src/cmd/cgo/internal/swig/testdata/stdio/main.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) -
src/cmd/cgo/internal/test/issue4273.c
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. #ifdef __ELF__ __attribute__((weak)) __attribute__((visibility("hidden"))) void _compilerrt_abort_impl(const char *file, int line, const char *func) { }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 12:00:02 UTC 2023 - 320 bytes - Viewed (0) -
src/cmd/cgo/internal/testsanitizers/testdata/msan5.go
/* #include <stdlib.h> extern void Go1(int*); extern void Go2(char*); // Use weak as a hack to permit defining a function even though we use export. void C1() __attribute__ ((weak)); void C2() __attribute__ ((weak)); void C1() { int i; Go1(&i); if (i != 42) { abort(); } } void C2() { char a[2]; a[1] = 42; Go2(a); if (a[0] != 42) { abort(); } } */
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 904 bytes - Viewed (0) -
src/cmd/cgo/internal/test/issue4029.go
// as dynamic export is not supported. package cgotest /* #include <stdint.h> #include <dlfcn.h> #cgo linux LDFLAGS: -ldl extern uintptr_t dlopen4029(char*, int); extern uintptr_t dlsym4029(uintptr_t, char*); extern int dlclose4029(uintptr_t); extern void call4029(uintptr_t arg); */ import "C" import ( "testing" ) var callbacks int //export IMPIsOpaque
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Aug 04 15:41:19 UTC 2023 - 1.5K bytes - Viewed (0) -
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");
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 12:00:02 UTC 2023 - 452 bytes - Viewed (0) -
src/cmd/cgo/internal/testcshared/testdata/main3.c
// license that can be found in the LICENSE file. #include <stdint.h> #include <stdio.h> #include <dlfcn.h> // Tests "main.main" is exported on android/arm, // which golang.org/x/mobile/app depends on. int main(int argc, char** argv) { void* handle = dlopen(argv[1], RTLD_LAZY | RTLD_GLOBAL); if (!handle) { fprintf(stderr, "ERROR: failed to open the shared library: %s\n", dlerror()); return 2; }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 785 bytes - Viewed (0) -
src/cmd/cgo/internal/testso/testdata/sovar/cgoso_c.c
// 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. //go:build ignore
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 19 01:37:41 UTC 2023 - 221 bytes - Viewed (0)