[Pkg-javascript-commits] [node-expat] 14/371: indentation
Jonas Smedegaard
dr at jones.dk
Sun Feb 28 09:59:40 UTC 2016
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository node-expat.
commit 8bff36b3434e23fdadbb21d7e8c60d8e54d835f0
Author: Astro <astro at spaceboyz.net>
Date: Sun May 23 16:02:02 2010 +0200
indentation
---
expat.cc | 65 +++++++++++++++++++++++++++++++++-------------------------------
1 file changed, 34 insertions(+), 31 deletions(-)
diff --git a/expat.cc b/expat.cc
index 9b2660c..723cf96 100644
--- a/expat.cc
+++ b/expat.cc
@@ -98,37 +98,40 @@ private:
/*** SAX callbacks ***/
- static void StartElement(void *userData, const XML_Char *name, const XML_Char **atts)
- {
- Parser *parser = reinterpret_cast<Parser *>(userData);
-
- /* Collect atts into JS object */
- Local<Object> attr = Object::New();
- for(const XML_Char **atts1 = atts; *atts1; atts1 += 2)
- attr->Set(String::New(atts1[0]), String::New(atts1[1]));
-
- /* Trigger event */
- Handle<Value> argv[2] = { String::New(name), attr };
- parser->Emit(sym_startElement, 2, argv);
- }
-
- static void EndElement(void *userData, const XML_Char *name)
- {
- Parser *parser = reinterpret_cast<Parser *>(userData);
-
- /* Trigger event */
- Handle<Value> argv[1] = { String::New(name) };
- parser->Emit(sym_endElement, 1, argv);
- }
-
- static void Text(void *userData, const XML_Char *s, int len)
- {
- Parser *parser = reinterpret_cast<Parser *>(userData);
-
- /* Trigger event */
- Handle<Value> argv[1] = { String::New(s, len) };
- parser->Emit(sym_text, 1, argv);
- }
+ static void StartElement(void *userData,
+ const XML_Char *name, const XML_Char **atts)
+ {
+ Parser *parser = reinterpret_cast<Parser *>(userData);
+
+ /* Collect atts into JS object */
+ Local<Object> attr = Object::New();
+ for(const XML_Char **atts1 = atts; *atts1; atts1 += 2)
+ attr->Set(String::New(atts1[0]), String::New(atts1[1]));
+
+ /* Trigger event */
+ Handle<Value> argv[2] = { String::New(name), attr };
+ parser->Emit(sym_startElement, 2, argv);
+ }
+
+ static void EndElement(void *userData,
+ const XML_Char *name)
+ {
+ Parser *parser = reinterpret_cast<Parser *>(userData);
+
+ /* Trigger event */
+ Handle<Value> argv[1] = { String::New(name) };
+ parser->Emit(sym_endElement, 1, argv);
+ }
+
+ static void Text(void *userData,
+ const XML_Char *s, int len)
+ {
+ Parser *parser = reinterpret_cast<Parser *>(userData);
+
+ /* Trigger event */
+ Handle<Value> argv[1] = { String::New(s, len) };
+ parser->Emit(sym_text, 1, argv);
+ }
};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-expat.git
More information about the Pkg-javascript-commits
mailing list