sapling/cstore
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
..
bitmanipulation.h cstore: add mpatch code from core 2017-02-23 14:03:03 -08:00
compat.h cstore: add mpatch code from core 2017-02-23 14:03:03 -08:00
datapackstore.cpp portability: use COMPOUND_LITERAL macro in place of actual compound literals 2017-04-06 09:34:40 -07:00
datapackstore.h portability: use COMPOUND_LITERAL macro in place of actual compound literals 2017-04-06 09:34:40 -07:00
key.h cstore: implement UnionDatapackStore.getdeltachain() 2017-02-23 14:03:03 -08:00
match.h treemanifest: support matcher in diff 2017-03-12 12:49:18 -07:00
mpatch.c cstore: add mpatch code from core 2017-02-23 14:03:03 -08:00
mpatch.h cstore: add mpatch code from core 2017-02-23 14:03:03 -08:00
py-cdatapack.h portability: replace variably-sized C arrays with explicit mallocs 2017-04-06 09:30:26 -07:00
py-cstore.cpp cstore: implement UnionDatapackStore 2017-02-23 14:03:03 -08:00
py-datapackstore.h cstore: move pythonutil to cstore 2017-03-07 11:39:46 -08:00
py-structs.h cstore: move uniondatapackstore holder to be a shared_ptr 2017-02-23 14:03:04 -08:00
py-treemanifest.h treemanifest: add matcher arg to filesnotin 2017-03-12 12:49:18 -07:00
pythonutil.cpp treemanifest: support matcher in diff 2017-03-12 12:49:18 -07:00
pythonutil.h cstore: move pythonutil to cstore 2017-03-07 11:39:46 -08:00
store.h cstore: move uniondatapackstore holder to be a shared_ptr 2017-02-23 14:03:04 -08:00
uniondatapackstore.cpp remotefilelog: explicitly cast from data_offset_t to (s)size_t 2017-04-04 11:48:27 -07:00
uniondatapackstore.h cstore: implement markForRefresh on cdatapackstore 2017-03-01 16:55:18 -08:00