aboutsummaryrefslogtreecommitdiff
path: root/ber/marshal.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-06-27 15:03:22 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-06-27 15:03:22 +0200
commit35611186639bd1632ae4be124133f866ab6a2107 (patch)
treec89b35c02f62b541d973555b0f0b13f235d3bed8 /ber/marshal.go
parent6b6c369b624b9ddccd9a23eed78e0340db99ad85 (diff)
Isolate reflect
Diffstat (limited to 'ber/marshal.go')
-rw-r--r--ber/marshal.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/ber/marshal.go b/ber/marshal.go
index ca91271..130bef5 100644
--- a/ber/marshal.go
+++ b/ber/marshal.go
@@ -80,3 +80,13 @@ func unsupportedTypeEncoder(e *encodeState, v reflect.Value) {
func (e *encodeState) error(err error) {
panic(err)
}
+
+func intEncoder(e *encodeState, v reflect.Value) {
+ b := marshalInt(v.Int())
+ e.Write(b)
+}
+
+func objEncoder(e *encodeState, v reflect.Value) {
+ b := marshalObj(v.Interface().(Obj))
+ e.Write(b)
+}