Skip to content

Instantly share code, notes, and snippets.

@jfirebaugh
Created October 23, 2012 04:52
Show Gist options
  • Select an option

  • Save jfirebaugh/3936763 to your computer and use it in GitHub Desktop.

Select an option

Save jfirebaugh/3936763 to your computer and use it in GitHub Desktop.
diff -r bf7fb95dc4e8 ext/pg_connection.c
--- a/ext/pg_connection.c Mon Oct 01 08:05:35 2012 -0700
+++ b/ext/pg_connection.c Mon Oct 22 21:51:46 2012 -0700
@@ -866,6 +866,7 @@
else {
Check_Type(param_value, T_STRING);
/* make sure param_value doesn't get freed by the GC */
+ RB_GC_GUARD(param_value);
rb_ary_push(gc_array, param_value);
paramValues[i] = StringValuePtr(param_value);
paramLengths[i] = (int)RSTRING_LEN(param_value);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment