Merge branch 'master' into smarter-imports

# Conflicts:
#	src/module/io.c
#	src/vm/wren_vm.c
This commit is contained in:
Bob Nystrom
2018-07-15 21:01:14 -07:00
43 changed files with 502 additions and 217 deletions
+2 -1
View File
@@ -192,6 +192,7 @@ static ModuleRegistry modules[] =
#undef END_CLASS
#undef METHOD
#undef STATIC_METHOD
#undef FINALIZER
// Looks for a built-in module with [name].
//
@@ -241,7 +242,7 @@ char* readBuiltInModule(const char* name)
size_t length = strlen(*module->source);
char* copy = (char*)malloc(length + 1);
strncpy(copy, *module->source, length + 1);
memcpy(copy, *module->source, length + 1);
return copy;
}
+11 -1
View File
@@ -9,11 +9,21 @@
#include <sys\stat.h>
// Map to Windows permission flags.
#ifndef S_IRUSR
#define S_IRUSR _S_IREAD
#define S_IWUSR _S_IWRITE
#endif
#ifndef S_IWUSR
#define S_IWUSR _S_IWRITE
#endif
#ifndef S_ISREG
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif
#ifndef S_ISDIR
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif
// Not supported on Windows.
#define O_SYNC 0