[Liblas-commits] r970 - trunk/python/liblas

liblas-commits at liblas.org liblas-commits at liblas.org
Thu Dec 25 00:38:08 EST 2008


Author: hobu
Date: Thu Dec 25 00:38:08 2008
New Revision: 970
URL: http://liblas.org/changeset/970

Log:
fix #89, broken liblas.version

Modified:
   trunk/python/liblas/core.py

Modified: trunk/python/liblas/core.py
==============================================================================
--- trunk/python/liblas/core.py	(original)
+++ trunk/python/liblas/core.py	Thu Dec 25 00:38:08 2008
@@ -134,18 +134,11 @@
 
 
 def get_version():
-    func = las.LAS_GetVersion
-    size = ctypes.c_int()
-    def errcheck(result, func, argtuple):
-        retval = ctypes.string_at(result, size.value)[:]
-        free(result)
-        return result
-    func.errcheck = errcheck
-    return func()
+    return las.LAS_GetVersion()
 
-#version = las.LAS_GetVersion()
-version = get_version()
 
+las.LAS_GetVersion.restype = ctypes.c_char_p
+version = get_version()
 las.LASError_GetLastErrorNum.restype = ctypes.c_int
 
 las.LASError_GetLastErrorMsg.restype = ctypes.c_char_p
@@ -521,4 +514,5 @@
 
 las.LASVLR_SetData.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_ubyte)]
 las.LASVLR_SetData.errcheck = check_value
-las.LASVLR_SetData.restype = ctypes.c_int
\ No newline at end of file
+las.LASVLR_SetData.restype = ctypes.c_int
+


More information about the Liblas-commits mailing list