diff options
author | Dave Beckett <dave@dajobe.org> | 2010-04-17 11:24:01 -0700 |
---|---|---|
committer | Dave Beckett <dave@dajobe.org> | 2010-04-17 11:24:01 -0700 |
commit | dad0566ef288e6330abf7144b6d644dbd6c11341 (patch) | |
tree | 8cee091376bb1e54ee6f0b0b12b9955351ca9844 /src/raptor_www.c | |
parent | 0b8d836b1592c4bd06c45062011fd4b155e6856b (diff) | |
download | raptor-dad0566ef288e6330abf7144b6d644dbd6c11341.tar.gz |
Make all constructors check for non-NULL args/world and call raptor_world_open()
Adjusted some documentation to allow NULL args that weren't noted,
such as raptor_new_turtle_writer() can take a NULL base_uri.
Diffstat (limited to 'src/raptor_www.c')
-rw-r--r-- | src/raptor_www.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/raptor_www.c b/src/raptor_www.c index 074fb29f..7417c8df 100644 --- a/src/raptor_www.c +++ b/src/raptor_www.c @@ -116,7 +116,13 @@ raptor_www_finish(raptor_world* world) raptor_www* raptor_new_www_with_connection(raptor_world* world, void *connection) { - raptor_www* www = (raptor_www* )RAPTOR_CALLOC(www, 1, sizeof(*www)); + raptor_www* www; + + RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL); + + raptor_world_open(world); + + www = (raptor_www* )RAPTOR_CALLOC(www, 1, sizeof(*www)); if(!www) return NULL; @@ -158,6 +164,10 @@ 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_world_open(world); + return raptor_new_www_with_connection(world, NULL); } |