Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 98 for define (0.2 sec)

  1. src/cmd/asm/internal/lex/lex_test.go

    		lines(
    			"#ifdef A",
    			"#ifdef B",
    			"#define C 1234",
    			"#else",
    			"#define C 5678",
    			"#endif",
    			"#endif",
    			"C",
    		),
    		"C.\n",
    	},
    	{
    		"nested #define",
    		lines(
    			"#define A #define B THIS",
    			"A",
    			"B",
    		),
    		"THIS.\n",
    	},
    	{
    		"nested #define with args",
    		lines(
    			"#define A #define B(x) x",
    			"A",
    			"B(THIS)",
    		),
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  2. src/cmd/asm/internal/lex/slice.go

    	// We only get here if defining a macro inside a macro.
    	// This imperfect implementation means we cannot tell the difference between
    	//	#define A #define B(x) x
    	// and
    	//	#define A #define B (x) x
    	// The first definition of B has an argument, the second doesn't. Because we let
    	// text/scanner strip the blanks for us, this is extremely rare, hard to fix, and not worth it.
    	return s.pos
    }
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Jun 29 22:49:50 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  3. src/cmd/asm/doc.go

    		Can be repeated to define multiple symbols.
    	-I dir1 -I dir2
    		Search for #include files in dir1, dir2, etc,
    		after consulting $GOROOT/pkg/$GOOS_$GOARCH.
    	-S
    		Print assembly and machine code.
    	-V
    		Print assembler version and exit.
    	-debug
    		Dump instructions as they are parsed.
    	-dynlink
    		Support references to Go symbols defined in other shared libraries.
    	-e
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 22 20:46:45 GMT 2023
    - 1.8K bytes
    - Viewed (0)
  4. src/cmd/cgo/internal/test/issue24161e0/main.go

      typedef CFStringRef SecKeyAlgorithm;
      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() {
    Go
    - Registered: Tue Mar 26 11:13:08 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 919 bytes
    - Viewed (0)
  5. src/cmd/cgo/gcc.go

    				// are in hex and half are in whatever the #define used.
    				n.Const = fmt.Sprintf("%#x", i)
    			} else if n.Define[0] == '\'' {
    				if _, err := parser.ParseExpr(n.Define); err == nil {
    					n.Kind = "iconst"
    					n.Const = n.Define
    				}
    			} else if n.Define[0] == '"' {
    				if _, err := parser.ParseExpr(n.Define); err == nil {
    					n.Kind = "sconst"
    					n.Const = n.Define
    				}
    			}
    
    			if n.IsConst() {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Nov 02 16:43:23 GMT 2023
    - 97K bytes
    - Viewed (0)
  6. src/cmd/asm/internal/lex/lex.go

    	return Token{ScanToken: token, text: text}
    }
    
    func (l Token) String() string {
    	return l.text
    }
    
    // A Macro represents the definition of a #defined macro.
    type Macro struct {
    	name   string   // The #define name.
    	args   []string // Formal arguments.
    	tokens []Token  // Body of macro.
    }
    
    // Tokenize turns a string into a list of Tokens; used to parse the -D flag and in tests.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 18:31:05 GMT 2023
    - 4.1K bytes
    - Viewed (0)
  7. src/cmd/asm/internal/lex/input.go

    		switch in.Stack.Text() {
    		case "else", "endif", "ifdef", "ifndef", "line":
    			// Press on.
    		default:
    			return false
    		}
    	}
    	switch in.Stack.Text() {
    	case "define":
    		in.define()
    	case "else":
    		in.else_()
    	case "endif":
    		in.endif()
    	case "ifdef":
    		in.ifdef(true)
    	case "ifndef":
    		in.ifdef(false)
    	case "include":
    		in.include()
    	case "line":
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 12.6K bytes
    - Viewed (0)
  8. src/cmd/cgo/internal/test/issue18146.go

    	attempts := 1000
    	threads := 4
    
    	// Restrict the number of attempts based on RLIMIT_NPROC.
    	// Tediously, RLIMIT_NPROC was left out of the syscall package,
    	// probably because it is not in POSIX.1, so we define it here.
    	// It is not defined on Solaris.
    	var nproc int
    	setNproc := true
    	switch runtime.GOOS {
    	default:
    		setNproc = false
    	case "aix":
    		nproc = 9
    	case "linux":
    		nproc = 6
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Sep 05 23:35:32 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  9. src/cmd/asm/internal/arch/arm.go

    		return true
    	}
    	return false
    }
    
    // MCR is not defined by the obj/arm; instead we define it privately here.
    // It is encoded as an MRC with a bit inside the instruction word,
    // passed to arch.ARMMRCOffset.
    const aMCR = arm.ALAST + 1
    
    // IsARMMRC reports whether the op (as defined by an arm.A* constant) is
    // MRC or MCR.
    func IsARMMRC(op obj.As) bool {
    	switch op {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Nov 18 17:59:44 GMT 2022
    - 6.1K bytes
    - Viewed (0)
  10. misc/cgo/gmp/gmp.go

    explicitly in Go to pointers to arrays, as they do (implicitly) in C.
    
    Garbage collection is the big problem.  It is fine for the Go world to
    have pointers into the C world and to free those pointers when they
    are no longer needed.  To help, the Go code can define Go objects
    holding the C pointers and use runtime.SetFinalizer on those Go objects.
    
    It is much more difficult for the C world to have pointers into the Go
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Apr 11 16:34:30 GMT 2022
    - 9.5K bytes
    - Viewed (0)
Back to top