Open-source graph database, built for real-time streaming data, compatible with Neo4j.
Go to file
Matej Ferencevic 7cd96dc2f5 Fix Python objects init
Summary:
`PyObject_Init` shouldn't be used in conjunction with `PyObject_New`.

The official Python documentation doesn't say this explicitly and many examples
on the web suggest that they must be used together. When they are used together
everything works when Memgraph is built against the release Python binary, but
doesn't work when built against the debug Python binary.

An implicit example that `PyObject_Init` shouldn't be used with `PyObject_New`
can be found in the Python source, in the file `Include/objimpl.h`:
```
   This example code implements an object constructor with a custom
   allocator, where PyObject_New is inlined, and shows the important
   distinction between two steps (at least):
       1) the actual allocation of the object storage;
       2) the initialization of the Python specific fields
      in this storage with PyObject_{Init, InitVar}.

   PyObject *
   YourObject_New(...)
   {
       PyObject *op;

       op = (PyObject *) Your_Allocator(_PyObject_SIZE(YourTypeStruct));
       if (op == NULL)
       return PyErr_NoMemory();

       PyObject_Init(op, &YourTypeStruct);

       op->ob_field = value;
       ...
       return op;
   }

   Note that in C++, the use of the new operator usually implies that
   the 1st step is performed automatically for you, so in a C++ class
   constructor you would start directly with PyObject_Init/InitVar
```
It explains that `PyObject_New` is actually equal to `malloc` +
`PyObject_Init`.

Reviewers: llugovic

Reviewed By: llugovic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D2737
2020-03-30 12:40:42 +02:00
cmake Migrate LDAP integration to auth module 2019-09-11 17:15:08 +02:00
config Enable properties on edges by default in package 2019-12-09 16:38:36 +01:00
docs Clean docs folder 2020-03-05 18:32:14 +01:00
environment Migrate to Clang 8 2019-04-19 12:34:50 +02:00
include Implement the PageRank module 2020-03-25 13:58:50 +01:00
libs Remove unused CMake options 2020-02-05 14:52:22 +01:00
query_modules Implement the PageRank module 2020-03-25 13:58:50 +01:00
release Update release docker 2020-03-18 17:50:20 +01:00
src Fix Python objects init 2020-03-30 12:40:42 +02:00
tests Make py::Object conversion to PyObject * explicit 2020-03-24 12:23:13 +01:00
tools Implement mg_import_csv 2020-03-03 14:33:43 +01:00
.arcconfig arcconfig: Default to master for diff and land 2017-11-07 18:41:51 +01:00
.arclint Remove cppcheck from arc linters 2020-02-17 17:40:39 +01:00
.clang-format Edges data structure now supports multiple edge filtering (implicit OR) 2017-09-26 13:46:18 +02:00
.clang-tidy Add .clang-tidy for tests and update the config 2019-10-31 16:07:09 +01:00
.gdbinit Add pretty printer to gdb for TypedValue 2017-08-16 11:32:25 +02:00
.gitignore Reimplement counter openCypher function 2019-05-16 11:09:02 +02:00
.ycm_extra_conf.py Add kafka library and integrate it into memgraph 2018-07-06 15:52:23 +02:00
apollo_archives.py Add community to Apollo build 2020-02-17 13:27:20 +01:00
apollo_archives.yaml Add community to Apollo build 2020-02-17 13:27:20 +01:00
apollo_build.yaml Add community to Apollo build 2020-02-17 13:27:20 +01:00
CHANGELOG.md Add changelog for version 0.50 2019-12-10 16:47:11 +01:00
CMakeLists.txt Implement version names for each Memgraph version 2020-02-12 10:05:40 +01:00
Doxyfile Remove customers/experimental/poc 2020-01-29 16:59:45 +01:00
Doxylogo.png Doxygen setup 2016-12-20 15:49:52 +01:00
init Add cppcheck and clang-format arc linters 2020-02-13 13:38:49 +01:00
README.md Migrate command line args to gflgs in tests 2017-07-06 13:54:12 +02:00

memgraph

Memgraph is an ACID compliant high performance transactional distributed in-memory graph database featuring runtime native query compiling, lock free data structures, multi-version concurrency control and asynchronous IO.

dependencies

Memgraph can be compiled using any modern c++ compiler. It mostly relies on the standard template library, however, some things do require external libraries.

Some code contains linux-specific libraries and the build is only supported on a 64 bit linux kernel.

  • linux
  • clang 3.8 (good c++11 support, especially lock free atomics)
  • antlr (compiler frontend)
  • cppitertools
  • fmt format
  • google benchmark
  • google test
  • glog
  • gflags