Skip to content

Commit

Permalink
Merge pull request topazproject#553 from modcloth/mbh/file-null
Browse files Browse the repository at this point in the history
Adding File::NULL
  • Loading branch information
alex committed Mar 26, 2013
2 parents 6a6f8be + 9d3b2bb commit 419ba27
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion spec/tags/core/file/null_tags.txt

This file was deleted.

3 changes: 3 additions & 0 deletions topaz/objects/fileobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,15 @@ def setup_class(cls, space, w_cls):
if IS_WINDOWS:
w_alt_seperator = space.newstr_fromstr("\\")
w_fnm_syscase = space.newint(0x08)
w_devnull = space.newstr_fromstr("NUL")
else:
w_alt_seperator = space.w_nil
w_fnm_syscase = space.newint(0)
w_devnull = space.newstr_fromstr("/dev/null")
space.set_const(w_cls, "SEPARATOR", space.newstr_fromstr("/"))
space.set_const(w_cls, "ALT_SEPARATOR", w_alt_seperator)
space.set_const(w_cls, "PATH_SEPARATOR", space.newstr_fromstr(os.pathsep))
space.set_const(w_cls, "NULL", w_devnull)
space.set_const(w_cls, "FNM_SYSCASE", w_fnm_syscase)
space.set_const(w_cls, "FNM_NOESCAPE", space.newint(FNM_NOESCAPE))
space.set_const(w_cls, "FNM_PATHNAME", space.newint(FNM_PATHNAME))
Expand Down

0 comments on commit 419ba27

Please sign in to comment.