sapling/cstore
Kostia Balytskyi 18c695ce6a portability: replace variably-sized C arrays with explicit mallocs
Summary:
This is an RFC kind of diff, so I am looking for comments. I am not very
familiar with either C or C++.
The goal is to make all this stuff compile on Windows under MSVC2015. MSVC
does not support variable-sized arrays in C++ out-of-the-box (not sure
whether there are tricks to make it do so), so my proposal is to use
explicit `malloc`s in place.

Test Plan:
Only tested on Linux for now. `python setup.py build` works,
tests pass, seems to make sense.

Reviewers: #sourcecontrol, jsgf

Reviewed By: jsgf

Subscribers: jsgf, mjpieters

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

Signature: t1:4839968:1491492552:c80fac6990aaee78e6bb18522ff13e02eb9521e4
2017-04-06 09:30:26 -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 cstore: use insert not emplace with std::unordered_set 2017-03-02 07:05:15 -08:00
datapackstore.h cstore: implement markForRefresh on cdatapackstore 2017-03-01 16:55:18 -08: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