Changeset 1322:e0723b684248
- Timestamp:
- 10/02/09 09:28:12 (10 months ago)
- Branch:
- 1.2
- File:
-
- 1 edited
-
python/liblas/core.py (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
python/liblas/core.py
r1308 r1322 94 94 raise LASException(msg) 95 95 retval = ctypes.string_at(result)[:] 96 free(result) 96 97 # these might end up being double frees, I don't know why 98 # free(result) 97 99 return retval 98 100 … … 101 103 size = ctypes.c_int() 102 104 retvalue = ctypes.string_at(result) 103 free(result) 105 106 # these might end up being double frees, I don't know why 107 # free(result) 104 108 return retvalue 105 106 107 108 try:109 from numpy import array, ndarray110 HAS_NUMPY = True111 except ImportError:112 HAS_NUMPY = False113 109 114 110 if os.name == 'nt': … … 303 299 las.LASHeader_GetFileSignature.argtypes = [ctypes.c_void_p] 304 300 las.LASHeader_GetFileSignature.errcheck = check_value_free 301 las.LASHeader_GetFileSignature.restype = ctypes.c_char_p 305 302 306 303 las.LASHeader_GetFileSourceId.restype = ctypes.c_ushort … … 310 307 las.LASHeader_GetProjectId.argtypes = [ctypes.c_void_p] 311 308 las.LASHeader_GetProjectId.errcheck = check_value_free 309 las.LASHeader_GetProjectId.restype = ctypes.c_char_p 312 310 313 311 las.LASHeader_GetVersionMajor.restype = ctypes.c_ubyte … … 327 325 las.LASHeader_GetSystemId.argtypes = [ctypes.c_void_p] 328 326 las.LASHeader_GetSystemId.errcheck = check_value_free 327 las.LASHeader_GetSystemId.restype = ctypes.c_char_p 329 328 las.LASHeader_SetSystemId.restype = ctypes.c_int 330 329 las.LASHeader_SetSystemId.argtypes = [ctypes.c_void_p, ctypes.c_char_p] … … 333 332 las.LASHeader_GetSoftwareId.argtypes = [ctypes.c_void_p] 334 333 las.LASHeader_GetSoftwareId.errcheck = check_value_free 334 las.LASHeader_GetSoftwareId.restype = ctypes.c_char_p 335 335 las.LASHeader_SetSoftwareId.restype = ctypes.c_int 336 336 las.LASHeader_SetSoftwareId.argtypes = [ctypes.c_void_p, ctypes.c_char_p] … … 484 484 las.LASGuid_AsString.argtypes = [ctypes.c_void_p] 485 485 las.LASGuid_AsString.errcheck = check_value_free 486 las.LASGuid_AsString.restype = ctypes.c_char_p 486 487 487 488 las.LASGuid_Equals.argtypes = [ctypes.c_void_p, ctypes.c_void_p] … … 512 513 las.LASVLR_GetUserId.argtypes = [ctypes.c_void_p] 513 514 las.LASVLR_GetUserId.errcheck = check_value_free 515 las.LASVLR_GetUserId.restype = ctypes.c_char_p 514 516 las.LASVLR_SetUserId.argtypes = [ctypes.c_void_p, ctypes.c_char_p] 515 517 las.LASVLR_SetUserId.errcheck = check_return … … 518 520 las.LASVLR_GetDescription.argtypes = [ctypes.c_void_p] 519 521 las.LASVLR_GetDescription.errcheck = check_value_free 522 las.LASVLR_GetDescription.restype = ctypes.c_char_p 520 523 las.LASVLR_SetDescription.argtypes = [ctypes.c_void_p, ctypes.c_char_p] 521 524 las.LASVLR_SetDescription.errcheck = check_return … … 596 599 las.LASSRS_GetProj4.argtypes = [ctypes.c_void_p] 597 600 las.LASSRS_GetProj4.errcheck = check_value_free 601 las.LASSRS_GetProj4.restype = ctypes.c_char_p 598 602 las.LASSRS_SetProj4.restype = ctypes.c_int 599 603 las.LASSRS_SetProj4.argtypes = [ctypes.c_void_p, ctypes.c_char_p] … … 602 606 las.LASSRS_GetWKT.argtypes = [ctypes.c_void_p] 603 607 las.LASSRS_GetWKT.errcheck = check_value_free 608 las.LASSRS_GetWKT.restype = ctypes.c_char_p 604 609 las.LASSRS_SetWKT.restype = ctypes.c_int 605 610 las.LASSRS_SetWKT.argtypes = [ctypes.c_void_p, ctypes.c_char_p]
Note: See TracChangeset
for help on using the changeset viewer.
