You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2011/10/24 22:49:40 UTC

svn commit: r1188370 - /subversion/trunk/subversion/libsvn_delta/compat.c

Author: hwright
Date: Mon Oct 24 20:49:39 2011
New Revision: 1188370

URL: http://svn.apache.org/viewvc?rev=1188370&view=rev
Log:
Don't bother allocating memory we'll never use when not enabling Ev2 shims.

* subversion/libsvn_delta/compat.c
  (svn_delta_shim_callbacks_default): Just return NULL if shims aren't enabled.

Modified:
    subversion/trunk/subversion/libsvn_delta/compat.c

Modified: subversion/trunk/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1188370&r1=1188369&r2=1188370&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/compat.c (original)
+++ subversion/trunk/subversion/libsvn_delta/compat.c Mon Oct 24 20:49:39 2011
@@ -1140,17 +1140,23 @@ svn_editor_from_delta(svn_editor_t **edi
   return SVN_NO_ERROR;
 }
 
+/* Uncomment below to add editor shims throughout Subversion.  In it's
+ * current state, that will likely break The World. */
+/* #define ENABLE_EDITOR_SHIMS*/
+
+
 svn_delta_shim_callbacks_t *
 svn_delta_shim_callbacks_default(apr_pool_t *result_pool)
 {
+#ifndef ENABLE_EDITOR_SHIMS
+  return NULL;
+#else
   svn_delta_shim_callbacks_t *shim_callbacks = apr_pcalloc(result_pool,
                                                      sizeof(*shim_callbacks));
   return shim_callbacks;
+#endif
 }
 
-/* Uncomment below to add editor shims throughout Subversion.  In it's
- * current state, that will likely break The World. */
-/* #define ENABLE_EDITOR_SHIMS*/
 
 svn_error_t *
 svn_editor__insert_shims(const svn_delta_editor_t **deditor_out,