[seed] modules: Use NULL instead of 0 to ensure type safety



commit 38ef8720434aff3447a442c31549d46d72e330e8
Author: Tim Horton <hortont424 gmail com>
Date:   Thu Jan 7 20:40:05 2010 -0500

    modules: Use NULL instead of 0 to ensure type safety

 modules/cairo/seed-cairo.c                     |    6 +-
 modules/canvas/seed-canvas.c                   |    4 +-
 modules/dbus/module.c                          |   16 ++---
 modules/ffi/seed-ffi.c                         |    2 +-
 modules/gettext/seed-gettext.c                 |    2 +-
 modules/libxml/seed-libxml.c                   |   72 ++++++++++++------------
 modules/mpfr/seed-mpfr.c                       |    4 +-
 modules/multiprocessing/seed-multiprocessing.c |    2 +-
 modules/os/seed-os.c                           |    2 +-
 modules/readline/seed-readline.c               |    2 +-
 modules/sandbox/seed-sandbox.c                 |    2 +-
 modules/sqlite/seed-sqlite.c                   |    2 +-
 12 files changed, 57 insertions(+), 59 deletions(-)
---
diff --git a/modules/cairo/seed-cairo.c b/modules/cairo/seed-cairo.c
index f28ec0a..83bfd19 100644
--- a/modules/cairo/seed-cairo.c
+++ b/modules/cairo/seed-cairo.c
@@ -1734,8 +1734,8 @@ seed_static_value cairo_values[] = {
   {"operator", seed_cairo_get_operator, seed_cairo_set_operator, SEED_PROPERTY_ATTRIBUTE_DONT_DELETE},
   {"tolerance", seed_cairo_get_tolerance, seed_cairo_set_tolerance, SEED_PROPERTY_ATTRIBUTE_DONT_DELETE},
   {"matrix", seed_cairo_get_matrix, seed_cairo_set_matrix, SEED_PROPERTY_ATTRIBUTE_DONT_DELETE},
-  {"target", seed_cairo_get_target, 0, SEED_PROPERTY_ATTRIBUTE_READ_ONLY | SEED_PROPERTY_ATTRIBUTE_DONT_DELETE},
-  {0, 0, 0, 0}
+  {"target", seed_cairo_get_target, NULL, SEED_PROPERTY_ATTRIBUTE_READ_ONLY | SEED_PROPERTY_ATTRIBUTE_DONT_DELETE},
+  {NULL, NULL, NULL, 0}
 };
 
 seed_static_function cairo_funcs[] = {
@@ -1799,7 +1799,7 @@ seed_static_function cairo_funcs[] = {
   {"device_to_user", seed_cairo_device_to_user, 0},
   {"device_to_user_distance", seed_cairo_device_to_user_distance, 0},
   {"destroy", seed_cairo_destroy, 0},
-  {0, 0, 0}
+  {NULL, NULL, 0}
 };
 
 SeedObject
diff --git a/modules/canvas/seed-canvas.c b/modules/canvas/seed-canvas.c
index 8144d83..8d86167 100644
--- a/modules/canvas/seed-canvas.c
+++ b/modules/canvas/seed-canvas.c
@@ -1033,7 +1033,7 @@ seed_static_function canvas_funcs[] = {
   {"finish", seed_canvas_finish, 0},
   {"showPage", seed_canvas_showpage, 0},
   {"destroy", seed_canvas_destroy, 0},
-  {0, 0, 0}
+  {NULL, NULL, 0}
 };
 
 seed_static_value canvas_properties[] = {
@@ -1045,7 +1045,7 @@ seed_static_value canvas_properties[] = {
   {"fillStyle", 0, seed_canvas_update_fill_style, 0},
   {"globalAlpha", 0, seed_canvas_update_global_alpha, 0},
   {"globalCompositeOperation", 0, seed_canvas_update_global_composite, 0},
-  {0, 0, 0, 0}
+  {NULL, NULL, NULL, 0}
 };
 
 SeedObject
diff --git a/modules/dbus/module.c b/modules/dbus/module.c
index b4455e1..d9afa22 100644
--- a/modules/dbus/module.c
+++ b/modules/dbus/module.c
@@ -1362,8 +1362,8 @@ seed_js_dbus_signature_length (SeedContext ctx,
 }
 
 seed_static_value bus_values[] = {
-  {"unique_name", unique_name_getter, 0, 0},
-  {0,0,0, 0}
+  {"unique_name", unique_name_getter, NULL, 0},
+  {NULL, NULL, NULL, 0}
 };
 
 seed_static_function bus_funcs[] = {
@@ -1377,19 +1377,17 @@ seed_static_function bus_funcs[] = {
   {"unwatch_signal", seed_js_dbus_unwatch_signal, 0},
   {"emit_signal", seed_js_dbus_emit_signal, 0},
   {"start_service", seed_js_dbus_start_service, 0},
-  {0, 0, 0}
+  {NULL, NULL, 0}
 };
 
 seed_static_function dbus_funcs[] = {
-  {"signatureLength", seed_js_dbus_signature_length, 0}
-  ,
-  {0, 0, 0}
+  {"signatureLength", seed_js_dbus_signature_length, 0},
+  {NULL, NULL, 0}
 };
 
 seed_static_value dbus_values[] = {
-  {"localMachineID", seed_js_dbus_get_machine_id, 0, 0}
-  ,
-  {0, 0, 0, 0}
+  {"localMachineID", seed_js_dbus_get_machine_id, NULL, 0},
+  {NULL, NULL, NULL, 0}
 };
 
 static void
diff --git a/modules/ffi/seed-ffi.c b/modules/ffi/seed-ffi.c
index 83ec65e..a5d8dab 100644
--- a/modules/ffi/seed-ffi.c
+++ b/modules/ffi/seed-ffi.c
@@ -481,7 +481,7 @@ seed_ffi_library_finalize (SeedObject obj)
 
 seed_static_value ffi_function_values [] = {
   {"signature", seed_ffi_get_signature, seed_ffi_set_signature, SEED_PROPERTY_ATTRIBUTE_DONT_DELETE},
-  {0, 0, 0, 0}
+  {NULL, NULL, NULL, 0}
 };
 
 SeedObject
diff --git a/modules/gettext/seed-gettext.c b/modules/gettext/seed-gettext.c
index 3061bdc..2a30ced 100644
--- a/modules/gettext/seed-gettext.c
+++ b/modules/gettext/seed-gettext.c
@@ -288,7 +288,7 @@ seed_static_function gettext_funcs[] = {
 	{"dcngettext", seed_gettext_dcngettext, 0},
 	{"setlocale", seed_gettext_setlocale, 0},
 	{"gettext", seed_gettext_gettext, 0},
-	{0, 0, 0}
+	{NULL, NULL, 0}
 };
 
 SeedObject
diff --git a/modules/libxml/seed-libxml.c b/modules/libxml/seed-libxml.c
index 0adf21b..ed7e4ee 100644
--- a/modules/libxml/seed-libxml.c
+++ b/modules/libxml/seed-libxml.c
@@ -450,65 +450,65 @@ seed_xml_xpathobj_get_value (SeedContext ctx,
 
 seed_static_function doc_funcs[] = {
   {"xpathNewContext", seed_xml_construct_xpath_context, 0},
-  {0, 0, 0}
+  {NULL, NULL, 0}
 };
 
 seed_static_value doc_values[] = {
-  {"root", seed_xml_doc_get_root, 0, 0},
-  {"name", seed_xml_node_get_name, 0, 0},
-  {"children", seed_xml_node_get_children, 0, 0},
-  {"parent", seed_xml_node_get_parent, 0, 0},
-  {"next", seed_xml_node_get_next, 0, 0},
-  {"prev", seed_xml_node_get_prev, 0, 0},
-  {"last", seed_xml_node_get_last, 0, 0},
-  {"doc", seed_xml_node_get_doc, 0, 0},
-  {"type", seed_xml_node_get_type, 0, 0},
-  {0, 0, 0, 0}
+  {"root", seed_xml_doc_get_root, NULL, 0},
+  {"name", seed_xml_node_get_name, NULL, 0},
+  {"children", seed_xml_node_get_children, NULL, 0},
+  {"parent", seed_xml_node_get_parent, NULL, 0},
+  {"next", seed_xml_node_get_next, NULL, 0},
+  {"prev", seed_xml_node_get_prev, NULL, 0},
+  {"last", seed_xml_node_get_last, NULL, 0},
+  {"doc", seed_xml_node_get_doc, NULL, 0},
+  {"type", seed_xml_node_get_type, NULL, 0},
+  {NULL, NULL, NULL, 0}
 };
 
 seed_static_function node_funcs[] = {
-  {0, 0, 0}
+  {NULL, NULL, 0}
 };
 
 seed_static_value node_values[] = {
-  {"name", seed_xml_node_get_name, 0, 0},
-  {"children", seed_xml_node_get_children, 0, 0},
-  {"parent", seed_xml_node_get_parent, 0, 0},
-  {"next", seed_xml_node_get_next, 0, 0},
-  {"prev", seed_xml_node_get_prev, 0, 0},
-  {"content", seed_xml_node_get_content, 0, 0},
-  {"last", seed_xml_node_get_last, 0, 0},
-  {"doc", seed_xml_node_get_doc, 0, 0},
-  {"type", seed_xml_node_get_type, 0, 0},
-  {"properties", seed_xml_node_get_properties, 0, 0},
-  {0, 0, 0, 0}
+  {"name", seed_xml_node_get_name, NULL, 0},
+  {"children", seed_xml_node_get_children, NULL, 0},
+  {"parent", seed_xml_node_get_parent, NULL, 0},
+  {"next", seed_xml_node_get_next, NULL, 0},
+  {"prev", seed_xml_node_get_prev, NULL, 0},
+  {"content", seed_xml_node_get_content, NULL, 0},
+  {"last", seed_xml_node_get_last, NULL, 0},
+  {"doc", seed_xml_node_get_doc, NULL, 0},
+  {"type", seed_xml_node_get_type, NULL, 0},
+  {"properties", seed_xml_node_get_properties, NULL, 0},
+  {NULL, NULL, NULL, 0}
 };
 
 seed_static_function attr_funcs[] = {
-  {0, 0, 0}
+  {NULL, NULL, 0}
 };
 
 seed_static_value attr_values[] = {
-  {"name", seed_xml_node_get_name, 0, 0},
-  {"children", seed_xml_node_get_children, 0, 0},
-  {"parent", seed_xml_node_get_parent, 0, 0},
-  {"next", seed_xml_node_get_next, 0, 0},
-  {"prev", seed_xml_node_get_prev, 0, 0},
-  {"last", seed_xml_node_get_last, 0, 0},
-  {"doc", seed_xml_node_get_doc, 0, 0},
-  {"type", seed_xml_node_get_type, 0, 0},
-  {0, 0, 0, 0}
+  {"name", seed_xml_node_get_name, NULL, 0},
+  {"children", seed_xml_node_get_children, NULL, 0},
+  {"parent", seed_xml_node_get_parent, NULL, 0},
+  {"next", seed_xml_node_get_next, NULL, 0},
+  {"prev", seed_xml_node_get_prev, NULL, 0},
+  {"last", seed_xml_node_get_last, NULL, 0},
+  {"doc", seed_xml_node_get_doc, NULL, 0},
+  {"type", seed_xml_node_get_type, NULL, 0},
+  {NULL, NULL, NULL, 0}
 };
 
 seed_static_function xpath_funcs[] = {
   {"xpathEval", seed_xml_xpath_eval, 0},
   {"xpathRegisterNs", seed_xml_xpath_register_ns, 0},
-  {0, 0, 0}
+  {NULL, NULL, 0}
 };
 
 seed_static_value xpathobj_values[] = {
-  {"value", seed_xml_xpathobj_get_value, 0, 0},
-  {0, 0, 0, 0}
+  {"value", seed_xml_xpathobj_get_value, NULL, 0},
+  {NULL, NULL, NULL, 0}
 };
 
 static void
diff --git a/modules/mpfr/seed-mpfr.c b/modules/mpfr/seed-mpfr.c
index 3333117..a30f759 100644
--- a/modules/mpfr/seed-mpfr.c
+++ b/modules/mpfr/seed-mpfr.c
@@ -996,7 +996,7 @@ seed_static_value mpfr_ns_values[] =
     {"erangeflag", seed_mpfr_erangeflag_p, seed_mpfr_set_erangeflag, SEED_PROPERTY_ATTRIBUTE_DONT_DELETE},
     {"version", seed_mpfr_get_version, NULL, SEED_PROPERTY_ATTRIBUTE_DONT_DELETE},
     {"patches", seed_mpfr_get_patches, NULL, SEED_PROPERTY_ATTRIBUTE_DONT_DELETE},
-    {NULL, 0, NULL, 0}
+    {NULL, NULL, NULL, 0}
 };
 
 seed_static_function mpfr_ns_funcs[] =
@@ -1127,7 +1127,7 @@ seed_static_value mpfr_values[] =
 {
     {"prec", seed_mpfr_get_prec, seed_mpfr_set_prec, SEED_PROPERTY_ATTRIBUTE_DONT_DELETE},
     {"exp", seed_mpfr_get_exp, seed_mpfr_set_exp, SEED_PROPERTY_ATTRIBUTE_DONT_DELETE},
-    {NULL, 0, NULL, 0}
+    {NULL, NULL, NULL, 0}
 };
 
 SeedObject
diff --git a/modules/multiprocessing/seed-multiprocessing.c b/modules/multiprocessing/seed-multiprocessing.c
index f00a2e3..68ae5d8 100644
--- a/modules/multiprocessing/seed-multiprocessing.c
+++ b/modules/multiprocessing/seed-multiprocessing.c
@@ -184,7 +184,7 @@ seed_static_function pipe_funcs[] = {
   {"read", seed_pipe_read, 0},
   {"write", seed_pipe_write, 0},
   {"add_watch", seed_pipe_add_watch, 0},
-  {0, 0, 0}
+  {NULL, NULL, 0}
 };
 
 SeedObject
diff --git a/modules/os/seed-os.c b/modules/os/seed-os.c
index b227229..e56cd50 100644
--- a/modules/os/seed-os.c
+++ b/modules/os/seed-os.c
@@ -1066,7 +1066,7 @@ seed_static_function os_funcs[] = {
   {"tcgetpgrp", seed_os_tcgetpgrp, 0},
   {"tcsetpgrp", seed_os_tcsetpgrp, 0},
   {"access", seed_os_access, 0},
-  {0, 0, 0}
+  {NULL, NULL, 0}
 };
 
 #define OS_DEFINE_ENUM(name, value) \
diff --git a/modules/readline/seed-readline.c b/modules/readline/seed-readline.c
index 8dac0a9..2f3a6cd 100644
--- a/modules/readline/seed-readline.c
+++ b/modules/readline/seed-readline.c
@@ -178,7 +178,7 @@ seed_static_function readline_funcs[] = {
 	{"done", seed_rl_done, 0},
 	{"buffer", seed_rl_buffer, 0},
 	{"insert", seed_rl_insert, 0},
-	{0, 0, 0}
+	{NULL, NULL, 0}
 };
 
 SeedObject
diff --git a/modules/sandbox/seed-sandbox.c b/modules/sandbox/seed-sandbox.c
index 435dcac..b33e57d 100644
--- a/modules/sandbox/seed-sandbox.c
+++ b/modules/sandbox/seed-sandbox.c
@@ -107,7 +107,7 @@ seed_static_function context_funcs[] = {
   {"eval", seed_context_eval, 0},
   {"add_globals", seed_sandbox_context_add_globals, 0},
   {"destroy", seed_sandbox_context_destroy, 0},
-  {0, 0, 0}
+  {NULL, NULL, 0}
 };
 
 SeedObject
diff --git a/modules/sqlite/seed-sqlite.c b/modules/sqlite/seed-sqlite.c
index b6a4c94..1103b31 100644
--- a/modules/sqlite/seed-sqlite.c
+++ b/modules/sqlite/seed-sqlite.c
@@ -184,7 +184,7 @@ SeedValue seed_sqlite_close(SeedContext ctx,
 seed_static_function database_funcs[] = {
   {"close", seed_sqlite_close, 0},
   {"exec", seed_sqlite_exec, 0},
-  {0, 0, 0}
+  {NULL, NULL, 0}
 };
 
 SeedObject



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