summaryrefslogtreecommitdiffhomepage
path: root/src/go/unit/cbytes-1.6.go
blob: f756b1dea605b921ad7eab0f6ab1ba0046d415b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// +build !go1.7

/*
 * Copyright (C) Max Romanov
 * Copyright (C) NGINX, Inc.
 */

package unit

import "C"
import "unsafe"

func getCBytes(p []byte) unsafe.Pointer {
	return unsafe.Pointer(C.CString(string(p))) // go <= 1.6
}