Commit e1ff8534964d31811181ca97f12a5ee94a073850

Parents: a95c912d0302259e50a73d02c6e5fc9a6c2ed5a3

From: Moritz Poldrack <git@moritz.sh>
Date: Wed Dec 8 18:04:53 2021 +0700

added github mirroring

		

Stats

.build.yml +8/-0
README.md +1/-1
testdata/benchmarks/yenc.go +0/-25

Changeset

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
diff --git a/.build.yml b/.build.yml
index feb2c40418cb810ca62ce0c9cd8618fe26ee18c5..23ba6f15ecf58660e597d47fb33f97f53b495629 100644
--- a/.build.yml
+++ b/.build.yml
@@ -1,9 +1,17 @@
 image: archlinux
 packages:
+  - git
   - go
+secrets:
+  - a4a77b05-94e0-443c-9408-b2d81f7263fe
+  - b15309e0-8156-44c8-aa7c-58c0f0b7d503
 sources:
   - https://git.sr.ht/~poldi1405/go-yenc
 tasks:
+  - mirror-to-github: |
+      git clone --mirror https://git.sr.ht/~poldi1405/go-yenc
+      cd go-yenc.git
+      git push --mirror git@github.com:mpldr/go-yenc.git
   - setup: |
       cd go-yenc
       go test -v -cover -race .
diff --git a/README.md b/README.md
index f705a8e6c6be3a3e68c66932c88346b0f66b5bfe..378c88563eaadd87e60dde9620bf3c6452a2492b 100644
--- a/README.md
+++ b/README.md
@@ -19,4 +19,4 @@ ## License
 
 The code is Licensed under the MPL 2.0
 
-Copyright (c) 2020 Moritz Poldrack
+Copyright (c) 2020-2021 Moritz Poldrack
diff --git a/testdata/benchmarks/yenc.go b/testdata/benchmarks/yenc.go
index 00f613b3c9c93a842272f97eb5a181438c16e2ec..b08af7225c4db65693ad41f25b319bbc7bd6ae33 100644
--- a/testdata/benchmarks/yenc.go
+++ b/testdata/benchmarks/yenc.go
@@ -1,19 +1,5 @@
 package yenc
 
-// #include <stdlib.h>
-// void yenc(unsigned char **arr) {
-//	(*arr)[1] += 42;
-//	switch((*arr)[1]) {
-//		case 0x00:
-//		case 0x0A:
-//		case 0x0D:
-//		case 0x3D:
-//			(*arr)[0] = 0x3D;
-//			(*arr)[1] += 0x40;
-//	}
-// }
-import "C"
-
 import (
 	"unsafe"
 
@@ -138,14 +124,3 @@ 	0x2a,
 	0x2a,
 	0x2a,
 }
-
-func CYEnc(input *[2]byte) {
-	cb := C.CBytes([]byte{0, (*input)[1]})
-	defer C.free(cb)
-
-	C.yenc((**C.uchar)(cb))
-
-	done := C.GoBytes(cb, 2)
-	input[0] = done[0]
-	input[1] = done[1]
-}