From 66ca444d06476589bb903d84d8ce5e89261238ec Mon Sep 17 00:00:00 2001 From: "Eric W. Brown" Date: Sat, 11 Jun 2011 13:42:17 -0400 Subject: [PATCH 1/3] Added the ability to properly process DBUS_TYPE_DOUBLE. --- src/node_dbus_convert.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/node_dbus_convert.hpp b/src/node_dbus_convert.hpp index a9cf944..9832949 100644 --- a/src/node_dbus_convert.hpp +++ b/src/node_dbus_convert.hpp @@ -139,6 +139,9 @@ struct v8_sink { case DBUS_TYPE_BOOLEAN: dst_->Set(idx_++, v8::Boolean::New(it.get())); break; + case DBUS_TYPE_DOUBLE: + dst_->Set(idx_++, v8::Number::New(it.get())); + break; case DBUS_TYPE_INT32: dst_->Set(idx_++, v8::Integer::New(it.get())); break; From d6142ba2aa6fc63397241fef2b8f4e88a17d47d5 Mon Sep 17 00:00:00 2001 From: "Eric W. Brown" Date: Wed, 27 Jul 2011 07:19:39 -0400 Subject: [PATCH 2/3] Added support for doubles in the other direction, too. --- src/node_dbus_convert.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/node_dbus_convert.hpp b/src/node_dbus_convert.hpp index 9832949..2de2c63 100644 --- a/src/node_dbus_convert.hpp +++ b/src/node_dbus_convert.hpp @@ -199,6 +199,9 @@ class dbus_sink { } else if ((*it)->IsUint32()) { uint32_t v = (*it)->Uint32Value(); dbus_message_iter_append_basic( & it_, DBUS_TYPE_UINT32, & v); + } else if ((*it)->IsNumber()) { + double v = (*it)->NumberValue(); + dbus_message_iter_append_basic( & it_, DBUS_TYPE_DOUBLE, & v); } else if ((*it)->IsString()) { v8::String::Utf8Value v((*it)->ToString()); const char * str = *v; From 361617963b777c477bfa3db4531ea09798eb1fc2 Mon Sep 17 00:00:00 2001 From: "Eric W. Brown" Date: Sat, 31 Aug 2013 11:34:44 -0400 Subject: [PATCH 3/3] Added .DS_Store to .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 61373af..4dea5f2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ build *.node .lock-wscript +.DS_Store +