Permalink
Browse files

Add Version.inspect(), bump minor

  • Loading branch information...
1 parent 41e1323 commit 51876fc0e326a87a99333fd5dd3b5ef1400ad475 @jmendeth jmendeth committed Aug 14, 2012
Showing with 8 additions and 2 deletions.
  1. +1 −1 package.json
  2. +7 −1 src/robotskirt.cc
View
@@ -1,7 +1,7 @@
{ "name": "robotskirt"
, "description": "A node wrapper for the awesome C markdown parsing library, sundown."
, "keywords": ["sundown", "upskirt", "robot", "markdown", "mkd"]
-, "version": "2.1.4"
+, "version": "2.2.0"
, "author": "Ben Mills <ben@bmdev.org>"
, "maintainers": [ "Ben Mills <ben@bmdev.org>"
View
@@ -690,6 +690,11 @@ class Version: public ObjectWrap {
return scope.Close(String::New(h.toString().c_str()));
} V8_WRAP_END()
+ static V8_CALLBACK(Inspect, 0) {
+ Version& h = *(Unwrap<Version>(args.Holder()));
+ return scope.Close(String::New( ("<Version "+h.toString()+">").c_str() ));
+ } V8_WRAP_END()
+
//Getters
static V8_GETTER(GetMajor) {
Version& h = *(Unwrap<Version>(info.Holder()));
@@ -751,6 +756,7 @@ void initVersion(Handle<Object> target) {
prot->InstanceTemplate()->SetAccessor(String::NewSymbol("revision"), Version::GetRevision, Version::SetRevision);
NODE_SET_PROTOTYPE_METHOD(prot, "toString", Version::ToString);
+ NODE_SET_PROTOTYPE_METHOD(prot, "inspect", Version::Inspect);
target->Set(String::NewSymbol("Version"), prot->GetFunction());
StoreTemplate("Version", prot);
@@ -815,7 +821,7 @@ extern "C" {
target->Set(String::NewSymbol("markdownVersion"), mv->GetFunction());
//Robotskirt version
- target->Set(String::NewSymbol("version"), (new Version(2,1,4))->Wrapped());
+ target->Set(String::NewSymbol("version"), (new Version(2,2,0))->Wrapped());
//RENDERER class
initRenderer(target);

0 comments on commit 51876fc

Please sign in to comment.