Re: [PATCH 05/10] Add string-specific memory pool
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 11 quoted lines
> diff --git a/Makefile b/Makefile
> index e7c33ec..24103c9 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -415,6 +415,7 @@ TEST_PROGRAMS_NEED_X += test-path-utils
> TEST_PROGRAMS_NEED_X += test-run-command
> TEST_PROGRAMS_NEED_X += test-sha1
> TEST_PROGRAMS_NEED_X += test-sigchain
> +TEST_PROGRAMS_NEED_X += test-string-pool
> TEST_PROGRAMS_NEED_X += test-treap
> TEST_PROGRAMS_NEED_X += test-index-version
Does your Makefile do the right thing to vcs-svn/*.[oa] upon "make clean"?
Show 16 quoted lines
> diff --git a/vcs-svn/string_pool.c b/vcs-svn/string_pool.c
> new file mode 100644
> index 0000000..550f0e5
> --- /dev/null
> +++ b/vcs-svn/string_pool.c
> @@ -0,0 +1,102 @@
> ...
> +uint32_t pool_intern(const char *key)
> +{
> + /* Canonicalize key */
> + struct node *match = NULL;
> + uint32_t key_len;
> + if (key == NULL)
> + return ~0;
> + key_len = strlen(key) + 1;
> + struct node *node = node_pointer(node_alloc(1));Please fix decl-after-stmt here.