Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for wrapping (0.19 sec)

  1. src/cmd/cgo/internal/swig/testdata/stdio/main.swig

    /* Copyright 2011 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.  */
    
    /* A trivial example of wrapping a C library using 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';
    %}
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:07 GMT 2023
    - 563 bytes
    - Viewed (0)
  2. misc/wasm/wasm_exec.js

    				false,
    				globalThis,
    				this,
    			];
    			this._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id
    			this._ids = new Map([ // mapping from JS values to reference ids
    				[0, 1],
    				[null, 2],
    				[true, 3],
    				[false, 4],
    				[globalThis, 5],
    				[this, 6],
    			]);
    			this._idPool = [];   // unused ids that have been garbage collected
    JavaScript
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon May 22 17:47:47 GMT 2023
    - 16.3K bytes
    - Viewed (1)
  3. src/bufio/example_test.go

    	// Output: 15
    }
    
    // Use a Scanner with a custom split function (built by wrapping ScanWords) to validate
    // 32-bit decimal input.
    func ExampleScanner_custom() {
    	// An artificial input source.
    	const input = "1234 5678 1234567901234567890"
    	scanner := bufio.NewScanner(strings.NewReader(input))
    	// Create a custom split function by wrapping the existing ScanWords function.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  4. src/cmd/asm/internal/lex/lex.go

    package lex
    
    import (
    	"fmt"
    	"log"
    	"os"
    	"strings"
    	"text/scanner"
    
    	"cmd/internal/src"
    )
    
    // A ScanToken represents an input item. It is a simple wrapping of rune, as
    // returned by text/scanner.Scanner, plus a couple of extra values.
    type ScanToken rune
    
    const (
    	// Asm defines some two-character lexemes. We make up
    	// a rune/ScanToken value for them - ugly but simple.
    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)
  5. src/cmd/asm/internal/lex/tokenizer.go

    package lex
    
    import (
    	"go/build/constraint"
    	"io"
    	"os"
    	"strings"
    	"text/scanner"
    	"unicode"
    
    	"cmd/asm/internal/flags"
    	"cmd/internal/objabi"
    	"cmd/internal/src"
    )
    
    // A Tokenizer is a simple wrapping of text/scanner.Scanner, configured
    // for our purposes and made a TokenReader. It forms the lowest level,
    // turning text from readers into tokens.
    type Tokenizer struct {
    	tok  ScanToken
    	s    *scanner.Scanner
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Aug 04 20:35:21 GMT 2022
    - 3K bytes
    - Viewed (0)
  6. misc/chrome/gophertool/gopher.js

            if (t < 150000) {
                // We could use the golang.org/cl/ handler here, but
                // avoid some redirect latency and go right there, since
                // one is easy. (no server-side mapping)
                return "https://github.com/golang/go/issues/" + t;
            }
            return "https://golang.org/cl/" + t;
        }
    
        if (gerritChangeIdRE.test(t)) {
            return "https://golang.org/cl/" + t;
        }
    JavaScript
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Sat Jul 11 14:36:33 GMT 2015
    - 1.2K bytes
    - Viewed (0)
  7. src/bytes/bytes.go

    }
    
    // Map returns a copy of the byte slice s with all its characters modified
    // according to the mapping function. If mapping returns a negative value, the character is
    // dropped from the byte slice with no replacement. The characters in s and the
    // output are interpreted as UTF-8-encoded code points.
    func Map(mapping func(r rune) rune, s []byte) []byte {
    	// In the worst case, the slice can grow when mapped, making
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Feb 19 19:51:15 GMT 2024
    - 33.8K bytes
    - Viewed (0)
  8. doc/go_spec.html

    Initially, the bound type parameters are known but the map is empty.
    During type unification, if a new type argument <code>A</code> is inferred,
    the respective mapping <code>P ➞ A</code> from type parameter to argument
    is added to the map.
    Conversely, when comparing types, a known type argument
    (a type argument for which a map entry already exists)
    HTML
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 00:39:16 GMT 2024
    - 279.6K bytes
    - Viewed (0)
  9. misc/cgo/gmp/gmp.go

    // Copyright 2009 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.
    
    /*
    An example of wrapping a C library in Go. This is the GNU
    multiprecision library gmp's integer type mpz_t wrapped to look like
    the Go package big's integer type Int.
    
    This is a syntactically valid Go program—it can be parsed with 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)
  10. src/cmd/cgo/gcc.go

    func (tr *TypeRepr) Set(repr string, fargs ...interface{}) {
    	tr.Repr = repr
    	tr.FormatArgs = fargs
    }
    
    // FinishType completes any outstanding type mapping work.
    // In particular, it resolves incomplete pointer types.
    func (c *typeConv) FinishType(pos token.Pos) {
    	// Completing one pointer type might produce more to complete.
    	// Keep looping until they're all done.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Nov 02 16:43:23 GMT 2023
    - 97K bytes
    - Viewed (0)
Back to top