[seed] [docs] seed_value_to/from_filename, binary_string, etc



commit b3ab1da1d2dd3edd04d193a00b0f76b2b935849a
Author: Tim Horton <hortont svn gnome org>
Date:   Sun Jul 12 16:04:43 2009 -0400

    [docs] seed_value_to/from_filename, binary_string, etc

 libseed/seed-api.c   |   32 ++++++++++++++++++--------------
 libseed/seed-types.c |   43 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+), 14 deletions(-)
---
diff --git a/libseed/seed-api.c b/libseed/seed-api.c
index 9fae65f..f88380f 100644
--- a/libseed/seed-api.c
+++ b/libseed/seed-api.c
@@ -104,19 +104,6 @@ seed_context_unref (JSGlobalContextRef ctx)
 }
 
 /**
- * seed_make_null:
- * @ctx: A #SeedContext.
- *
- * Return value: A #SeedValue representing %NULL.
- *
- */
-JSValueRef
-seed_make_null (JSContextRef ctx)
-{
-  return JSValueMakeNull (ctx);
-}
-
-/**
  * seed_make_object:
  * @ctx: The #SeedContext in which to create the new object.
  * @class: The #SeedClass to use to create the new object, or %NULL to use the
@@ -678,11 +665,28 @@ seed_make_array (JSContextRef ctx,
 }
 
 /**
+ * seed_make_null:
+ * @ctx: A valid #SeedContext
+ *
+ * Note that this function returns a valid SeedValue,
+ * representing the null JavaScript value, and not a
+ * null SeedValue.
+ *
+ * Return value: A #SeedValue of the 'null' type.
+ *
+ */
+JSValueRef
+seed_make_null (JSContextRef ctx)
+{
+  return JSValueMakeNull (ctx);
+}
+
+/**
  * seed_make_undefined:
  * @ctx: A valid #SeedContext
  *
  * Note that this function returns a valid SeedValue,
- * representing the undefined javascript value, and not an
+ * representing the undefined JavaScript value, and not an
  * undefined SeedValue.
  *
  * Return value: A #SeedValue of the 'undefined' type.
diff --git a/libseed/seed-types.c b/libseed/seed-types.c
index 738ce6c..bce5361 100644
--- a/libseed/seed-types.c
+++ b/libseed/seed-types.c
@@ -1995,6 +1995,21 @@ seed_value_from_string (JSContextRef ctx,
   return valstr;
 }
 
+/**
+ * seed_value_from_binary_string:
+ * @ctx: A #SeedContext.
+ * @bytes: A string of bytes to represent as a string.
+ * @n_bytes: The number of bytes from @bytes to convert.
+ * @exception: A reference to a #SeedValue in which to store any exceptions.
+ *             Pass %NULL to ignore exceptions.
+ *
+ * Converts a string representation of the given binary string
+ * into a #SeedValue.
+ *
+ * Return value: A #SeedValue which represents @bytes as a string, or %NULL
+ *               if an exception is raised during the conversion.
+ *
+ */
 JSValueRef
 seed_value_from_binary_string (JSContextRef ctx,
 			       const gchar *bytes,
@@ -2012,6 +2027,20 @@ seed_value_from_binary_string (JSContextRef ctx,
   return ret;
 }
 
+/**
+ * seed_value_to_filename:
+ * @ctx: A #SeedContext.
+ * @val: The #SeedValue to convert.
+ * @exception: A reference to a #SeedValue in which to store any exceptions.
+ *             Pass %NULL to ignore exceptions.
+ *
+ * Converts the given #SeedValue into a #gchar*, properly converting to the 
+ * character set used for filenames on the local machine.
+ *
+ * Return value: The #gchar* represented by @val, or %NULL if an exception
+ *               is raised during the conversion.
+ *
+ */
 gchar *
 seed_value_to_filename (JSContextRef ctx,
 			JSValueRef val, JSValueRef * exception)
@@ -2032,6 +2061,20 @@ seed_value_to_filename (JSContextRef ctx,
   return filename;
 }
 
+/**
+ * seed_value_from_filename:
+ * @ctx: A #SeedContext.
+ * @filename: The #gchar* filename to represent.
+ * @exception: A reference to a #SeedValue in which to store any exceptions.
+ *             Pass %NULL to ignore exceptions.
+ *
+ * Converts the given #gchar* filename into a #SeedValue, respecting the 
+ * character set used for filenames on the local machine.
+ *
+ * Return value: A #SeedValue which represents @val, or %NULL if an exception
+ *               is raised during the conversion.
+ *
+ */
 JSValueRef
 seed_value_from_filename (JSContextRef ctx,
 			  const gchar * filename, JSValueRef * exception)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]