mongofill / mongofill-hhvm

A mix of the original Mongofill extension + BSON implementation in C++
MIT License
32 stars 19 forks source link

Replace base-includes.h with extension.h #37

Closed leev closed 9 years ago

leev commented 9 years ago

Helps with Issue #31 for compiling with hhvm 3.7.

mcuadros commented 9 years ago

Cannot perform any test over this, If any can test that this is working will be great

leev commented 9 years ago

Unfortunately it's still failing to build. See https://github.com/facebook/hhvm/commit/91e07b951496b5bfbbb189fd5401e9dd5e711c43 for the removal of base-includes.h.

# make [ 33%] Building CXX object CMakeFiles/mongo.dir/src/bson.cpp.o /home/build/mongofill-hhvm/src/bson.cpp: In function ‘HPHP::String HPHP::f_bson_encode_multiple(const HPHP::Array&)’: /home/build/mongofill-hhvm/src/bson.cpp:62:32: error: variable ‘HPHP::ArrayIter iter’ has initializer but incomplete type for (ArrayIter iter(documents); iter; ++iter) { ^ make[2]: *** [CMakeFiles/mongo.dir/src/bson.cpp.o] Error 1 make[1]: *** [CMakeFiles/mongo.dir/all] Error 2 make: *** [all] Error 2

keithk commented 9 years ago

Was able to add this to bson.cpp and get a successful compile.

#include "hphp/runtime/base/array-iterator.h"
a-carvallo commented 9 years ago

@keithk I had to also add the include in encode.cpp in order to compile.

leev commented 9 years ago

Thanks guys, I have updated the commit to include those changes.

mcuadros commented 9 years ago

Great job! Thanks for the help