Skip to content

Commit 62d5e32

Browse files
committed
proper types
1 parent 1d35666 commit 62d5e32

File tree

5 files changed

+9
-12
lines changed

5 files changed

+9
-12
lines changed

+stdlib/+dotnet/device.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
% this has been not so stable, so we disabled it and leave it here for reference.
44

5-
i = [];
5+
i = 0;
66

77
h = NET.addAssembly('System.Management');
88

+stdlib/+python/device.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
function i = device(p)
22

3-
i = [];
3+
i = 0;
4+
45
try
56
i = int64(py.os.stat(p).st_dev);
67
% int64 first is for Matlab <= R2022a

+stdlib/+python/inode.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function i = inode(p)
22

3-
i = [];
3+
i = 0;
44

55
try
66
i = int64(py.os.stat(p).st_ino);

+stdlib/+sys/inode.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function i = inode(m)
22

3-
i = [];
3+
i = 0;
44

55
if ispc()
66
cmd = "fsutil file queryfileid " + m;

+stdlib/inode.m

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,11 @@
77
p {mustBeTextScalar}
88
end
99

10-
i = [];
11-
12-
if stdlib.has_python()
13-
i = stdlib.python.inode(p);
14-
elseif isunix() && stdlib.has_java()
10+
if isunix() && stdlib.has_java()
1511
i = stdlib.java.inode(p);
16-
end
17-
18-
if isempty(i)
12+
elseif stdlib.has_python()
13+
i = stdlib.python.inode(p);
14+
else
1915
i = stdlib.sys.inode(p);
2016
end
2117

0 commit comments

Comments
 (0)