Example #1
0
//export cbioNew
func cbioNew(b *C.BIO) C.int {
	b.shutdown = 1
	b.init = 1
	b.num = -1
	b.ptr = nil
	b.flags = 0
	return 1
}
Example #2
0
//export go_conn_bio_new
func go_conn_bio_new(bio *C.BIO) C.int {
	//we are initializing here
	bio.init = C.int(1)
	//see mem_new()
	bio.num = C.int(-1)
	bio.ptr = nil
	bio.flags = C.BIO_FLAGS_READ | C.BIO_FLAGS_WRITE
	return C.int(1)
}