You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2010/08/22 13:43:48 UTC

svn commit: r987872 - in /subversion/branches/performance/subversion: include/private/svn_temp_serializer.h libsvn_fs_fs/dag.c libsvn_subr/svn_temp_serializer.c

Author: stefan2
Date: Sun Aug 22 11:43:47 2010
New Revision: 987872

URL: http://svn.apache.org/viewvc?rev=987872&view=rev
Log:
Build file generation scripts don't handle uppercase identifiers.
Therefore, we can't have NULL or similar substrings in public identifiers.

* subversion/include/private/svn_temp_serializer.h
  (svn_temp_serializer__set_null): rename from svn_temp_serializer__set_NULL
* subversion/libsvn_subr/svn_temp_serializer.c
  (svn_temp_serializer__set_null): dito
* subversion/libsvn_fs_fs/dag.c
  (svn_fs_fs__dag_serializ): adapt usage

Patch by: Johan Corveleyn <jc...@gmail.com>

Modified:
    subversion/branches/performance/subversion/include/private/svn_temp_serializer.h
    subversion/branches/performance/subversion/libsvn_fs_fs/dag.c
    subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c

Modified: subversion/branches/performance/subversion/include/private/svn_temp_serializer.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/private/svn_temp_serializer.h?rev=987872&r1=987871&r2=987872&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/private/svn_temp_serializer.h (original)
+++ subversion/branches/performance/subversion/include/private/svn_temp_serializer.h Sun Aug 22 11:43:47 2010
@@ -122,7 +122,7 @@ svn_temp_serializer__add_string(svn_temp
  * source structure.
  */
 void
-svn_temp_serializer__set_NULL(svn_temp_serializer__context_t *context,
+svn_temp_serializer__set_null(svn_temp_serializer__context_t *context,
                               const void * const * ptr);
 
 /**

Modified: subversion/branches/performance/subversion/libsvn_fs_fs/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_fs_fs/dag.c?rev=987872&r1=987871&r2=987872&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_fs_fs/dag.c (original)
+++ subversion/branches/performance/subversion/libsvn_fs_fs/dag.c Sun Aug 22 11:43:47 2010
@@ -1099,7 +1099,7 @@ svn_fs_fs__dag_serialize(char **data,
   if (node->node_revision && !svn_fs_fs__dag_check_mutable(node))
     svn_fs_fs__noderev_serialize(context, &node->node_revision);
   else
-    svn_temp_serializer__set_NULL(context,
+    svn_temp_serializer__set_null(context,
                                   (const void * const *)&node->node_revision);
 
   /* serialize other sub-structures */

Modified: subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c?rev=987872&r1=987871&r2=987872&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c (original)
+++ subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c Sun Aug 22 11:43:47 2010
@@ -239,7 +239,7 @@ svn_temp_serializer__add_string(svn_temp
  * useful if the pointer is not NULL in the source structure.
  */
 void
-svn_temp_serializer__set_NULL(svn_temp_serializer__context_t *context,
+svn_temp_serializer__set_null(svn_temp_serializer__context_t *context,
                               const void * const * ptr)
 {
   apr_size_t offset;



Re: svn commit: r987872 - in /subversion/branches/performance/subversion: include/private/svn_temp_serializer.h libsvn_fs_fs/dag.c libsvn_subr/svn_temp_serializer.c

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
stefan2@apache.org wrote on Sun, Aug 22, 2010 at 11:43:48 -0000:
> Author: stefan2
> Date: Sun Aug 22 11:43:47 2010
> New Revision: 987872
> 
> URL: http://svn.apache.org/viewvc?rev=987872&view=rev
> Log:
> Build file generation scripts don't handle uppercase identifiers.
> Therefore, we can't have NULL or similar substrings in public identifiers.
> 
> * subversion/include/private/svn_temp_serializer.h
>   (svn_temp_serializer__set_null): rename from svn_temp_serializer__set_NULL
> 
> Patch by: Johan Corveleyn <jc...@gmail.com>

Guys, would this be a better fix?

[[[
Index: build/generator/extractor.py
===================================================================
--- build/generator/extractor.py        (revision 987515)
+++ build/generator/extractor.py        (working copy)
@@ -34,7 +34,7 @@
 # or
 #    void svn_foo_bar (args)
 #
-_funcs = re.compile(r'^(?:(?:(?:\w+|\*) )+\*?)?((?:svn|apr)_[a-z_0-9]+)\s*\(', re.M)
+_funcs = re.compile(r'^(?:(?:(?:\w+|\*) )+\*?)?((?:svn|apr)_[A-Za-z_0-9]+)\s*\(', re.M)
 
 def extract_funcs(fname):
   funcs = [ ]
]]]

Note: this is completely untested, since I'm not on Windows right now.

Daniel
(by the way, I found that file by doing 'grep -Rl kwallet ./build/' ---
which I did because I remembered seeing the svn_*kwallet* functions
added to the list of exceptions in the same file that handled parsing
out identifiers-to-be-exported on Windows.  I'm feeling old now...)