Skip to content

Instantly share code, notes, and snippets.

@lfittl
Created June 16, 2014 16:56
Show Gist options
  • Select an option

  • Save lfittl/5b22168d3af790c25d15 to your computer and use it in GitHub Desktop.

Select an option

Save lfittl/5b22168d3af790c25d15 to your computer and use it in GitHub Desktop.
List *tree;
char *str;
str = StringValueCStr(input);
tree = raw_parser(str);
str = nodeToJSONString(tree);
// Save stderr for result
read(stderr_pipe[0], stderr_buffer, STDERR_BUFFER_LEN);
result = rb_ary_new();
rb_ary_push(result, rb_tainted_str_new_cstr(str));
rb_ary_push(result, rb_str_new2(stderr_buffer));
pfree(str);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment