Author: dajobe
Date: Fri Jan 18 03:49:21 2008
New Revision: 13615

URL: http://svn.librdf.org/view?rev=3D13615&view=3Drev
Log:
Added define RAPTOR_JSON_WRITER_DATATYPES to remove unused fields and
initialising/freeing supporting commented-out function
raptor_json_writer_literal_datatype

Modified:
    raptor/trunk/src/raptor_json_writer.c

Modified: raptor/trunk/src/raptor_json_writer.c
URL: http://svn.librdf.org/view/raptor/trunk/src/raptor_json_writer.c?rev=
=3D13615&r1=3D13614&r2=3D13615&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- raptor/trunk/src/raptor_json_writer.c (original)
+++ raptor/trunk/src/raptor_json_writer.c Fri Jan 18 03:49:21 2008
@@ -52,6 +52,10 @@
 =

 #ifndef STANDALONE
 =

+#ifndef RAPTOR_JSON_WRITER_DATATYPES
+#define RAPTOR_JSON_WRITER_DATATYPES 0
+#endif
+
 struct raptor_json_writer_s {
   raptor_uri* base_uri;
   =

@@ -64,10 +68,12 @@
   /* outputting to this iostream */
   raptor_iostream *iostr;
 =

+#if RAPTOR_JSON_WRITER_DATATYPES =3D=3D 1
   raptor_uri* xsd_boolean_uri;
   raptor_uri* xsd_decimal_uri;
   raptor_uri* xsd_double_uri;
   raptor_uri* xsd_integer_uri;
+#endif
 =

   /* current indent */
   int indent;
@@ -113,10 +119,12 @@
   json_writer->iostr=3Diostr;
   json_writer->base_uri=3Dbase_uri;
 =

+#if RAPTOR_JSON_WRITER_DATATYPES =3D=3D 1
   json_writer->xsd_boolean_uri=3Draptor_new_uri((const unsigned char*)"htt=
p://www.w3.org/2001/XMLSchema#boolean");
   json_writer->xsd_decimal_uri=3Draptor_new_uri((const unsigned char*)"htt=
p://www.w3.org/2001/XMLSchema#decimal");
   json_writer->xsd_double_uri=3Draptor_new_uri((const unsigned char*)"http=
://www.w3.org/2001/XMLSchema#double");
   json_writer->xsd_integer_uri=3Draptor_new_uri((const unsigned char*)"htt=
p://www.w3.org/2001/XMLSchema#integer");
+#endif
 =

   json_writer->indent_step=3D2;
   =

@@ -135,6 +143,7 @@
 raptor_free_json_writer(raptor_json_writer* json_writer)
 {
 =

+#if RAPTOR_JSON_WRITER_DATATYPES =3D=3D 1
   if(json_writer->xsd_boolean_uri)
     raptor_free_uri(json_writer->xsd_boolean_uri);
   if(json_writer->xsd_decimal_uri)
@@ -143,6 +152,7 @@
     raptor_free_uri(json_writer->xsd_double_uri);
   if(json_writer->xsd_integer_uri)
     raptor_free_uri(json_writer->xsd_integer_uri);
+#endif
 =

   RAPTOR_FREE(raptor_json_writer, json_writer);
 }
@@ -306,7 +316,7 @@
 =

 /* not used here */
 =

-#if 0
+#if RAPTOR_JSON_WRITER_DATATYPES =3D=3D 1
 int raptor_json_writer_literal_datatype(raptor_json_writer* json_writer, r=
aptor_namespace_stack *nstack, unsigned char* s, unsigned char* lang, rapto=
r_uri* datatype);
 =

 =



_______________________________________________
redland-commits mailing list
[email protected]
http://lists.librdf.org/mailman/listinfo/redland-commits

Reply via email to