decode: fix pointers and fix null into string Fixes bug #1133337. R=jameinel CC= https://codereview.appspot.com/8019043
diff --git a/.lbox.check b/.lbox.check new file mode 100755 index 0000000..b4211c2 --- /dev/null +++ b/.lbox.check
@@ -0,0 +1,20 @@ +#!/bin/sh + +set -e + +BADFMT=`find * -name '*.go' | xargs gofmt -l` +if [ -n "$BADFMT" ]; then + BADFMT=`echo "$BADFMT" | sed "s/^/ /"` + echo -e "gofmt is sad:\n\n$BADFMT" + exit 1 +fi + +VERSION=`go version | awk '{print $3}'` +if [ $VERSION == 'devel' ]; then + go tool vet \ + -methods \ + -printf \ + -rangeloops \ + -printfuncs 'ErrorContextf:1,notFoundf:0,badReqErrorf:0,Commitf:0,Snapshotf:0,Debugf:0' \ + . +fi
diff --git a/decode.go b/decode.go index f4a8f2c..b03f36e 100644 --- a/decode.go +++ b/decode.go
@@ -1,6 +1,7 @@ package goyaml // #cgo LDFLAGS: -lm -lpthread +// #cgo windows CFLAGS: -DYAML_DECLARE_STATIC=1 -Dstrdup=_strdup // #cgo CFLAGS: -I. -DHAVE_CONFIG_H=1 // // #include "helpers.h"