sapling/cfastmanifest
Kostia Balytskyi 918e1011b3 portability: use COMPOUND_LITERAL macro in place of actual compound literals
Summary:
This is a s//g replacement of all the `return (type_name) {` with
`return COMPOUND_LITERAL(type_name) {`.
This is the command which produced the diff:
`egrep 'return \(\w*\) \{' -Ir . --exclude='*.py*' --exclude-dir=.hg -l | xargs sed 's/return (\(\w*\)) {/return COMPOUND_LITERAL(\1) {/g' -i `

After I've done this, I checked:
`egrep '\(\w+\) \{' -Ir . --exclude='*.py*' --exclude-dir=.hg | egrep -v '(switch|while)' | grep -v 'if (' | grep -v 'COMPOUND_LITERAL' | less`
and it looks like the only things of `(something) {` syntax are function definitions, adding space before `(` in search pattern yields no results.

This is needed to make this compile on Windows under MSVC2015.

Depends on: D4843230

Test Plan:
- run `python setup.py build -f`, see it compile
- run all the tests, see them pass

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4843240

Signature: t1:4843240:1491495690:a097bfab403805052d5ac25d1db7bb32af3bca28
2017-04-06 09:34:40 -07:00
..
.hgignore [fastmanifest] rename fastmanifest c library directory to cfastmanifest 2016-05-26 11:33:07 -07:00
bsearch_test.c [fastmanifest] rename fastmanifest c library directory to cfastmanifest 2016-05-26 11:33:07 -07:00
bsearch.c [fastmanifest] rename fastmanifest c library directory to cfastmanifest 2016-05-26 11:33:07 -07:00
bsearch.h [fastmanifest] rename fastmanifest c library directory to cfastmanifest 2016-05-26 11:33:07 -07:00
checksum_test.c [fastmanifest] rename fastmanifest c library directory to cfastmanifest 2016-05-26 11:33:07 -07:00
checksum.c [fastmanifest] rename fastmanifest c library directory to cfastmanifest 2016-05-26 11:33:07 -07:00
checksum.h [fastmanifest] rename fastmanifest c library directory to cfastmanifest 2016-05-26 11:33:07 -07:00
internal_result.h [fastmanifest] rename fastmanifest c library directory to cfastmanifest 2016-05-26 11:33:07 -07:00
node_test.c [fastmanifest] rename fastmanifest c library directory to cfastmanifest 2016-05-26 11:33:07 -07:00
node.c portability: use COMPOUND_LITERAL macro in place of actual compound literals 2017-04-06 09:34:40 -07:00
node.h portability: add a portability header 2017-04-06 09:33:34 -07:00
path_buffer.h port upgrades of buffer.h into clib 2016-08-26 17:14:52 -07:00
README [fastmanifest] rename fastmanifest c library directory to cfastmanifest 2016-05-26 11:33:07 -07:00
result.h [fastmanifest] rename fastmanifest c library directory to cfastmanifest 2016-05-26 11:33:07 -07:00
tests.c portability: use COMPOUND_LITERAL macro in place of actual compound literals 2017-04-06 09:34:40 -07:00
tests.h portability: add a portability header 2017-04-06 09:33:34 -07:00
tree_arena.c portability: use COMPOUND_LITERAL macro in place of actual compound literals 2017-04-06 09:34:40 -07:00
tree_arena.h [fastmanifest] rename fastmanifest c library directory to cfastmanifest 2016-05-26 11:33:07 -07:00
tree_convert_rt.c [fastmanifest] rename fastmanifest c library directory to cfastmanifest 2016-05-26 11:33:07 -07:00
tree_convert_test.c [fastmanifest] rename fastmanifest c library directory to cfastmanifest 2016-05-26 11:33:07 -07:00
tree_convert.c portability: use COMPOUND_LITERAL macro in place of actual compound literals 2017-04-06 09:34:40 -07:00
tree_copy_test.c [fastmanifest] rename fastmanifest c library directory to cfastmanifest 2016-05-26 11:33:07 -07:00
tree_copy.c port upgrades of buffer.h into clib 2016-08-26 17:14:52 -07:00
tree_diff_test.c [fastmanifest] rename fastmanifest c library directory to cfastmanifest 2016-05-26 11:33:07 -07:00
tree_diff.c port upgrades of buffer.h into clib 2016-08-26 17:14:52 -07:00
tree_disk_test.c [fastmanifest] rename fastmanifest c library directory to cfastmanifest 2016-05-26 11:33:07 -07:00
tree_disk.c portability: use COMPOUND_LITERAL macro in place of actual compound literals 2017-04-06 09:34:40 -07:00
tree_dump.c [fastmanifest] utility to dump some specs about a tree to disk 2016-07-26 23:35:53 -07:00
tree_iterate_rt.c [fastmanifest] rename fastmanifest c library directory to cfastmanifest 2016-05-26 11:33:07 -07:00
tree_iterator_test.c [fastmanifest] rename fastmanifest c library directory to cfastmanifest 2016-05-26 11:33:07 -07:00
tree_iterator.c port upgrades of buffer.h into clib 2016-08-26 17:14:52 -07:00
tree_iterator.h [fastmanifest] rename fastmanifest c library directory to cfastmanifest 2016-05-26 11:33:07 -07:00
tree_path.c portability: use COMPOUND_LITERAL macro in place of actual compound literals 2017-04-06 09:34:40 -07:00
tree_path.h portability: add a portability header 2017-04-06 09:33:34 -07:00
tree_test.c [fastmanifest] rename fastmanifest c library directory to cfastmanifest 2016-05-26 11:33:07 -07:00
tree.c portability: use COMPOUND_LITERAL macro in place of actual compound literals 2017-04-06 09:34:40 -07:00
tree.h portability: add a portability header 2017-04-06 09:33:34 -07:00

fastmanifest is a tree-based implementation to speed up manifest
operations in Mercurial.  Its design is optimized for quick
deserialization from a persistent store.  In compact form, the entire tree
is relocatable without any traversals.