Skip to content

Instantly share code, notes, and snippets.

octo /
Created February 28, 2012 08:19
Simple bash script for installing the MongoDB C library.
set -x
[[ -n "$PREFIX" ]] || PREFIX=/tmp/mongo-c-driver
cd $(basename $0)
install -d "$PREFIX" "$PREFIX/include" "$PREFIX/lib"
install -C *.so "$PREFIX/lib"
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <yajl/yajl_tree.h>
static int print_value (yajl_value_t *v, int indent);
diff --git a/src/python.c b/src/python.c
index 6be727e..ccc1c86 100644
--- a/src/python.c
+++ b/src/python.c
@@ -439,7 +439,7 @@ static int cpy_write_callback(const data_set_t *ds, const value_list_t *value_li
v->values = list;
v->meta = dict;
ret = PyObject_CallFunctionObjArgs(c->callback, v, c->data, (void *) 0); /* New reference
- Py_XDECREF(v);
+ Py_XDECREF(&v->data);
octo /
Created June 3, 2015 18:14

Keybase proof

I hereby claim:

  • I am octo on github.
  • I am octo ( on keybase.
  • I have a public key whose fingerprint is B29B EDBC 90D3 9DBB E177 3350 D42C 698E 0C70 5A15

To claim this, I am signing this object: