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 | # 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 | 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:
 | 	// Interesting side-effect:
 | ||||||
| 	// Making the destructor virtual causes segmentation faults
 | 	// 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
 | // 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
 | // http://www.ex-parrot.com/~chris/random/initialise.html
 | ||||||
| #define ALLOC_EXPR(var, type) 		\ | #define ALLOC_EXPR(var, type) 		\ | ||||||
| 	Expr* var;						\ | 	Expr* var;						\ | ||||||
| @ -92,6 +93,7 @@ struct Expr { | |||||||
| 		*var = zero;				\ | 		*var = zero;				\ | ||||||
| 	} while(0); | 	} while(0); | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| } // namespace hsql
 | } // namespace hsql
 | ||||||
| 
 | 
 | ||||||
| #endif | #endif | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Pedro
						Pedro