Skip to content

Instantly share code, notes, and snippets.

@derickr
Created December 7, 2011 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save derickr/1444009 to your computer and use it in GitHub Desktop.
Save derickr/1444009 to your computer and use it in GitHub Desktop.
Example diff
diff --git a/igbinary.c b/igbinary.c
index d439da7..64a2aa7 100644
--- a/igbinary.c
+++ b/igbinary.c
@@ -918,11 +918,15 @@ inline static int igbinary_serialize_array(struct igbinary_serialize_data *igsd,
switch (key_type) {
case HASH_KEY_IS_LONG:
- igbinary_serialize_long(igsd, key_index TSRMLS_CC);
+ if (igbinary_serialize_long(igsd, key_index TSRMLS_CC)) {
+ return 1;
+ }
break;
case HASH_KEY_IS_STRING:
- igbinary_serialize_string(igsd, key, key_len-1 TSRMLS_CC);
+ if (igbinary_serialize_string(igsd, key, key_len-1 TSRMLS_CC)) {
+ return 1;
+ }
break;
default:
zend_error(E_ERROR, "igbinary_serialize_array: key is not string nor array");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment