implemented expr null constructor
This commit is contained in:
parent
71cbe1bfac
commit
ab8622cbba
|
@ -3,7 +3,7 @@
|
|||
# Usage: deploy_to_hyrise.sh path/to/hyrise.git
|
||||
|
||||
|
||||
BUILD_PATH=$(readlink -f $(dirname $0))/src/build
|
||||
BUILD_PATH=$(readlink -f $(dirname $0))/build
|
||||
|
||||
HYRISE_PATH=$1
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ struct Expr {
|
|||
|
||||
|
||||
|
||||
Expr(ExprType type) : type(type) {};
|
||||
Expr(ExprType type) : type(type), expr(NULL), expr2(NULL), name(NULL), table(NULL), alias(NULL) {};
|
||||
|
||||
// Interesting side-effect:
|
||||
// Making the destructor virtual causes segmentation faults
|
||||
|
@ -83,6 +83,7 @@ struct Expr {
|
|||
};
|
||||
|
||||
// Zero initializes an Expr object and assigns it to a space in the heap
|
||||
// For Hyrise we still had to put in the explicit NULL constructor
|
||||
// http://www.ex-parrot.com/~chris/random/initialise.html
|
||||
#define ALLOC_EXPR(var, type) \
|
||||
Expr* var; \
|
||||
|
@ -90,7 +91,8 @@ struct Expr {
|
|||
Expr zero = {type}; \
|
||||
var = (Expr*)malloc(sizeof *var); \
|
||||
*var = zero; \
|
||||
} while(0);
|
||||
} while(0);
|
||||
|
||||
|
||||
} // namespace hsql
|
||||
|
||||
|
|
Loading…
Reference in New Issue