summarylogtreecommitdiffstats
path: root/isManaged.patch
blob: 5a89e6cbf76e03058728e498339d3ffe80744950 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/init.c b/init.c
index 8b32a1a..fd17692 100644
--- a/init.c
+++ b/init.c
@@ -935,7 +935,7 @@ static int cutorch_isManagedPtr(lua_State *L)
     lua_pushboolean(L, 0);
   } else {
     THCudaCheck(res);
-    lua_pushboolean(L, attributes.isManaged);
+    lua_pushboolean(L, attributes.type == 3);
   }
   return 1;
 }