From 7cd6faa3f4640a0cab67aa6247b04c96fd606c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Wed, 11 Nov 2009 13:53:49 +0100 Subject: [PATCH] Added SqlNULL_object. Rev: src/builtin.cmod:1.238 Rev: src/builtin_functions.h:1.39 --- src/builtin.cmod | 8 +++++++- src/builtin_functions.h | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/builtin.cmod b/src/builtin.cmod index 10b2280cbf..3ac1afc974 100644 --- a/src/builtin.cmod +++ b/src/builtin.cmod @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: builtin.cmod,v 1.237 2009/11/09 14:32:09 grubba Exp $ +|| $Id: builtin.cmod,v 1.238 2009/11/11 12:53:48 grubba Exp $ */ #include "global.h" @@ -4156,14 +4156,20 @@ PIKECLASS MasterCodec /*! @endmodule */ +struct object *SqlNULL_object; + void init_builtin(void) { init_pike_list_node_blocks(); INIT + + add_object_constant("SqlNULL", + SqlNULL_object = clone_object(SqlNull_program, 0), 0); } void exit_builtin(void) { + if (SqlNULL_object) free_object(SqlNULL_object); EXIT #ifndef DO_PIKE_CLEANUP /* This is performed by exit_builtin_modules() at a later point diff --git a/src/builtin_functions.h b/src/builtin_functions.h index c7a49ee652..a87cce070a 100644 --- a/src/builtin_functions.h +++ b/src/builtin_functions.h @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: builtin_functions.h,v 1.38 2009/11/09 14:33:02 grubba Exp $ +|| $Id: builtin_functions.h,v 1.39 2009/11/11 12:53:49 grubba Exp $ */ #ifndef BUILTIN_EFUNS_H @@ -46,6 +46,7 @@ struct replace_many_context int flags; }; +extern struct object *SqlNULL_object; extern struct program *SqlNull_program; PMOD_EXPORT void f_equal(INT32 args); -- GitLab