|
| 1 | +commit 567d4d1ab639d924e8d5af459476f331b9af0ce5 |
| 2 | +Author: Dave Beckett <dave@dajobe.org> |
| 3 | +Date: Tue Nov 4 15:25:20 2014 -0800 |
| 4 | + |
| 5 | + Fix error returns in new world methods |
| 6 | + |
| 7 | + (raptor_world_get_parser_factory, |
| 8 | + raptor_world_get_serializers_count): Fix return value in assertions |
| 9 | + |
| 10 | +diff --git a/src/raptor_parse.c b/src/raptor_parse.c |
| 11 | +index 26911f47752119c6..6caa7f1c231cc0c3 100644 |
| 12 | +--- a/src/raptor_parse.c |
| 13 | ++++ b/src/raptor_parse.c |
| 14 | +@@ -252,12 +252,12 @@ raptor_world_get_parser_factory(raptor_world *world, const char *name) |
| 15 | + * |
| 16 | + * Get number of parsers |
| 17 | + * |
| 18 | +- * Return value: number of parsers |
| 19 | ++ * Return value: number of parsers or <0 on failure |
| 20 | + **/ |
| 21 | + int |
| 22 | + raptor_world_get_parsers_count(raptor_world* world) |
| 23 | + { |
| 24 | +- RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL); |
| 25 | ++ RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, -1); |
| 26 | + |
| 27 | + raptor_world_open(world); |
| 28 | + |
| 29 | +diff --git a/src/raptor_serialize.c b/src/raptor_serialize.c |
| 30 | +index a1f29d78d33f82ee..a0344418441a2295 100644 |
| 31 | +--- a/src/raptor_serialize.c |
| 32 | ++++ b/src/raptor_serialize.c |
| 33 | +@@ -235,12 +235,12 @@ raptor_get_serializer_factory(raptor_world* world, const char *name) |
| 34 | + * |
| 35 | + * Get number of serializers |
| 36 | + * |
| 37 | +- * Return value: number of serializers |
| 38 | ++ * Return value: number of serializers or <0 on failure |
| 39 | + **/ |
| 40 | + int |
| 41 | + raptor_world_get_serializers_count(raptor_world* world) |
| 42 | + { |
| 43 | +- RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL); |
| 44 | ++ RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, -1); |
| 45 | + |
| 46 | + raptor_world_open(world); |
| 47 | + |
0 commit comments