diff options
author | Dave Beckett <dave@dajobe.org> | 2010-11-21 20:22:31 -0800 |
---|---|---|
committer | Dave Beckett <dave@dajobe.org> | 2010-11-21 20:22:31 -0800 |
commit | bdee4fdd0d6572c39e34a4a7dec6c5a374b8ff64 (patch) | |
tree | 46ffb566ee2e5ad056874c2c274ad4cd8c4ea567 /src/raptor_www.c | |
parent | 1e9bffa859ba1afef5f79949da9c40d781b20d92 (diff) | |
download | raptor-bdee4fdd0d6572c39e34a4a7dec6c5a374b8ff64.tar.gz |
Check world object is valid for Raptor V2 in every constructor
RAPTOR2_WORLD_MAGIC: Alter the RAPTOR_MAGIC value to be different for
raptor V2 and rename it inc ode. RAPTOR1_WORLD_MAGIC is the old value.
(raptor_check_constructor_world): Added to handle the check and provide
a function to debugger-break on. It warns once about the pointer
problems using a static var.
(RAPTOR_CHECK_CONSTRUCTOR_WORLD): Macro added to call
raptor_check_constructor_world() and replace generic
RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE check.
Diffstat (limited to 'src/raptor_www.c')
-rw-r--r-- | src/raptor_www.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/raptor_www.c b/src/raptor_www.c index a9bdb670..651880f7 100644 --- a/src/raptor_www.c +++ b/src/raptor_www.c @@ -118,7 +118,7 @@ raptor_new_www_with_connection(raptor_world* world, void *connection) { raptor_www* www; - RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL); + RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); raptor_world_open(world); @@ -164,7 +164,7 @@ raptor_new_www_with_connection(raptor_world* world, void *connection) raptor_www* raptor_new_www(raptor_world* world) { - RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL); + RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); raptor_world_open(world); |