Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #22 from bnoordhuis/fixups

v8gen: s/class/clazz/, 'class' is a reserved word now
  • Loading branch information...
commit b53f3cb47839e504ebce69538181a30a24b448e5 2 parents 1a69562 + ba25ea4
@fjakobs fjakobs authored
Showing with 18 additions and 8 deletions.
  1. +11 −1 include/cSys_posix.h
  2. +7 −7 tools/codequery/v8gen.js
View
12 include/cSys_posix.h
@@ -19,6 +19,7 @@
#define O3_C_SYS_WIN32_H
#include <stdlib.h>
+#include <errno.h>
#include <dlfcn.h>
#include <pthread.h>
#include <fcntl.h>
@@ -411,7 +412,16 @@ struct cMessageLoop : cUnk, iMessageLoop {
uint8_t msg[sizeof(Message)];
new (msg) Message(m_seq, fun, src);
- write(m_out, msg, sizeof(Message));
+
+ for (size_t i = 0; i < sizeof(msg); /* empty */) {
+ ssize_t r = write(m_out, msg + i, sizeof(msg) - i);
+ if (r >= 0)
+ i += static_cast<size_t>(r);
+ else if (errno == EINTR)
+ ; /* ignore */
+ else
+ return;
+ }
}
void wait(int timeout)
View
14 tools/codequery/v8gen.js
@@ -146,13 +146,13 @@ files.forEach(function(f){
});
function generate(file, classes) {
- var class,out=[];
+ var clazz,out=[];
out.push('namespace o3 {\n\n');
- for (var c=0; c<classes.length; c++) {
- class = classes[c];
- out.push(genFunctions(class.classname, class.properties),
- genExtTraitTable(class.classname, class.properties),
- genInit(class.classname, class.base, class.properties, class.enums)
+ for (var c=0; c<clazzes.length; c++) {
+ clazz = clazzes[c];
+ out.push(genFunctions(clazz.clazzname, clazz.properties),
+ genExtTraitTable(clazz.clazzname, clazz.properties),
+ genInit(clazz.clazzname, clazz.base, clazz.properties, clazz.enums)
);
}
@@ -531,4 +531,4 @@ function genExtTraitTable(className, properties) {
ret.push(' {V8Trait::TYPE_END, 0, 0, 0 }\n',' };\n',
' return TRAITS;','\n}\n\n');
return ret.join('');
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.