ffi-gdal 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5be516e43cc426c9f1fe2f0f0b701b971597d8e6
4
- data.tar.gz: 53d5d44e1450f3e3f4de809eb025723f1e2945d8
3
+ metadata.gz: bfa34b84ed0070848c6fde3721e8ef247a0c6ff9
4
+ data.tar.gz: f458c3e3f8c0f9d4e3ff0381f75017b6e123e03e
5
5
  SHA512:
6
- metadata.gz: 434c97cb29adc90a5f3daee4e5ac47a9560b7cb4959301b342988deb9976d4f579b0bc3a117d596f522e31725ecc2aa5f1519cf2d3bfb338677bee2fe8b447fc
7
- data.tar.gz: 186963aecb3376291c75694f2628393a36b3c31603bd79897610a0796c7dabcbbb1f5f2e6332bd269c4f5b143200e405ae3a5453f1cb558f0c7a8b1e1d0723e7
6
+ metadata.gz: d337efd0962ecf22a455026cdafcf76ea97ab12b173d270763d5eb9bce592778b61ce43b72ea932b380b926a0f77dd5091bb834a42dc7d41780ec1a9d6668b7e
7
+ data.tar.gz: dd9f8ecd705648a22a5a480b9b8f6e0a34a90eda87da49f95d9298b8989b1171f648878a32c12640d6103aa42cff788823cdb378f6caa8fb423b58f73b836d9d
data/Gemfile CHANGED
@@ -2,3 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in ffi-gdal.gemspec
4
4
  gemspec
5
+
6
+ gem 'pry'
data/History.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### 0.0.4 / 2014-09-27
2
+
3
+ * Bug fixes
4
+ * Fixed failure to load on Ubuntu 12.04 (GDAL v1.7.3).
5
+
1
6
  ### 0.0.3 / 2014-09-26
2
7
 
3
8
  * Improvements
@@ -7,6 +7,11 @@ module GDAL
7
7
 
8
8
  # @return [Array<String>]
9
9
  def metadata_domain_list
10
+ unless defined? FFI::GDAL::GDALGetMetadataDomainList
11
+ warn "GDALGetMetadataDomainList is't defined. GDAL::MajorObject#metadata_domain_list disabled."
12
+ return []
13
+ end
14
+
10
15
  # I don't quite get it, but if #GDALGetMetadataDomainList isn't called
11
16
  # twice, the last domain in the list sometimes doesn't get read.
12
17
  GDALGetMetadataDomainList(c_pointer)
@@ -300,7 +300,11 @@ module GDAL
300
300
  # is feet; other non-standard values are allowed.
301
301
  # @return [FFI::GDAL::CPLErr]
302
302
  def unit_type=(new_unit_type)
303
- GDALSetRasterUnitType(@gdal_raster_band, new_unit_type)
303
+ if defined? FFI::GDAL::GDALSetRasterUnitType
304
+ GDALSetRasterUnitType(@gdal_raster_band, new_unit_type)
305
+ else
306
+ warn "GDALSetRasterUnitType is not defined. Can't call RasterBand#unit_type="
307
+ end
304
308
  end
305
309
 
306
310
  # @return [GDAL::RasterAttributeTable]
data/lib/ffi/gdal.rb CHANGED
@@ -1,4 +1,41 @@
1
1
  require 'ffi'
2
+
3
+ module FFI
4
+ module GDAL
5
+ extend ::FFI::Library
6
+
7
+ def self.search_paths
8
+ @search_paths ||= begin
9
+ return if ENV['GDAL_LIBRARY_PATH']
10
+
11
+ if FFI::Platform.windows?
12
+ ENV['PATH'].split(File::PATH_SEPARATOR)
13
+ else
14
+ %w[/usr/local/{lib64,lib} /opt/local/{lib64,lib} /usr/{lib64,lib} /usr/lib/{x86_64,i386}-linux-gnu]
15
+ end
16
+ end
17
+ end
18
+
19
+ def self.find_lib(lib)
20
+ if ENV['GDAL_LIBRARY_PATH'] && File.file?(ENV['GDAL_LIBRARY_PATH'])
21
+ ENV['GDAL_LIBRARY_PATH']
22
+ else
23
+ Dir.glob(search_paths.map do |path|
24
+ File.expand_path(File.join(path, "#{lib}.#{FFI::Platform::LIBSUFFIX}"))
25
+ end).first
26
+ end
27
+ end
28
+
29
+ def self.gdal_library_path
30
+ return @gdal_library_path if @gdal_library_path
31
+
32
+ @gdal_library_path = find_lib('{lib,}gdal*')
33
+ end
34
+
35
+ ffi_lib(gdal_library_path)
36
+ end
37
+ end
38
+
2
39
  require_relative 'gdal/version'
3
40
  require_relative 'gdal/cpl_conv'
4
41
  require_relative 'gdal/cpl_error'
@@ -13,16 +50,6 @@ require_relative '../ext/to_bool'
13
50
 
14
51
  module FFI
15
52
  module GDAL
16
- extend ::FFI::Library
17
- ffi_lib 'gdal'
18
-
19
- include CPLError
20
- include CPLConv
21
- include CPLString
22
- include CPLVSI
23
- include OGRCore
24
- include OGRAPI
25
- include OGRSRSAPI
26
53
 
27
54
  #-----------------------------------------------------------------
28
55
  # Defines
@@ -188,8 +215,8 @@ module FFI
188
215
  attach_function :GDALDataTypeUnion, [GDALDataType, GDALDataType], GDALDataType
189
216
 
190
217
  # AsyncStatus
191
- attach_function :GDALGetAsyncStatusTypeName, [GDALAsyncStatusType], :string
192
- attach_function :GDALGetAsyncStatusTypeByName, [:string], GDALAsyncStatusType
218
+ #attach_function :GDALGetAsyncStatusTypeName, [GDALAsyncStatusType], :string
219
+ #attach_function :GDALGetAsyncStatusTypeByName, [:string], GDALAsyncStatusType
193
220
 
194
221
  # ColorInterpretation
195
222
  attach_function :GDALGetColorInterpretationName, [GDALColorInterp], :string
@@ -259,11 +286,11 @@ module FFI
259
286
  attach_function :GDALApplyGeoTransform,
260
287
  [:pointer, :double, :double, :pointer, :pointer],
261
288
  :void
262
- attach_function :GDALComposeGeoTransforms,
263
- [:pointer, :pointer, :pointer],
264
- :void
289
+ #attach_function :GDALComposeGeoTransforms,
290
+ # [:pointer, :pointer, :pointer],
291
+ # :void
265
292
 
266
- attach_function :GDALGetMetadataDomainList, [:GDALMajorObjectH], :pointer
293
+ #attach_function :GDALGetMetadataDomainList, [:GDALMajorObjectH], :pointer
267
294
  attach_function :GDALGetMetadata, [:GDALMajorObjectH, :string], :pointer
268
295
  attach_function :GDALSetMetadata,
269
296
  [:GDALMajorObjectH, :pointer, :string],
@@ -293,28 +320,28 @@ module FFI
293
320
  [:GDALDatasetH, GDALDataType, :pointer],
294
321
  CPLErr
295
322
 
296
- attach_function :GDALBeginAsyncReader,
297
- [
298
- :GDALDatasetH,
299
- GDALRWFlag,
300
- :int,
301
- :int,
302
- :int,
303
- :int,
304
- :pointer,
305
- :int,
306
- :int,
307
- GDALDataType,
308
- :int,
309
- :pointer,
310
- :int,
311
- :int,
312
- :int
313
- ], :GDALAsyncReaderH
314
-
315
- attach_function :GDALEndAsyncReader,
316
- [:GDALDatasetH, :GDALAsyncReaderH],
317
- :void
323
+ #attach_function :GDALBeginAsyncReader,
324
+ # [
325
+ # :GDALDatasetH,
326
+ # GDALRWFlag,
327
+ # :int,
328
+ # :int,
329
+ # :int,
330
+ # :int,
331
+ # :pointer,
332
+ # :int,
333
+ # :int,
334
+ # GDALDataType,
335
+ # :int,
336
+ # :pointer,
337
+ # :int,
338
+ # :int,
339
+ # :int
340
+ #], :GDALAsyncReaderH
341
+
342
+ #attach_function :GDALEndAsyncReader,
343
+ # [:GDALDatasetH, :GDALAsyncReaderH],
344
+ # :void
318
345
 
319
346
  attach_function :GDALDatasetRasterIO,
320
347
  [
@@ -389,14 +416,14 @@ module FFI
389
416
  attach_function :GDALDatasetCopyWholeRaster,
390
417
  [:GDALDatasetH, :GDALDatasetH, :pointer, :GDALProgressFunc, :pointer],
391
418
  CPLErr
392
- attach_function :GDALRasterBandCopyWholeRaster,
393
- [
394
- :GDALRasterBandH,
395
- :GDALRasterBandH,
396
- :pointer,
397
- :GDALProgressFunc,
398
- :pointer
399
- ], CPLErr
419
+ #attach_function :GDALRasterBandCopyWholeRaster,
420
+ # [
421
+ # :GDALRasterBandH,
422
+ # :GDALRasterBandH,
423
+ # :pointer,
424
+ # :GDALProgressFunc,
425
+ # :pointer
426
+ # ], CPLErr
400
427
  attach_function :GDALRegenerateOverviews,
401
428
  [
402
429
  :GDALRasterBandH,
@@ -517,7 +544,7 @@ module FFI
517
544
  [:GDALRasterBandH, :double, :double, :double, :double],
518
545
  CPLErr
519
546
  attach_function :GDALGetRasterUnitType, [:GDALRasterBandH], :string
520
- attach_function :GDALSetRasterUnitType, [:GDALRasterBandH, :string], CPLErr
547
+ #attach_function :GDALSetRasterUnitType, [:GDALRasterBandH, :string], CPLErr
521
548
  attach_function :GDALGetRasterOffset, [:GDALRasterBandH, :pointer], :double
522
549
  attach_function :GDALSetRasterOffset, [:GDALRasterBandH, :double], CPLErr
523
550
  attach_function :GDALGetRasterScale, [:GDALRasterBandH, :pointer], :double
@@ -1,151 +1,144 @@
1
- require 'ffi'
2
1
  require_relative 'cpl_error'
3
2
  require_relative 'cpl_vsi'
4
3
 
5
4
 
6
5
  module FFI
7
6
  module GDAL
8
- module CPLConv
9
- extend ::FFI::Library
10
- ffi_lib 'gdal'
11
7
 
12
- include CPLError
13
-
14
- def CPLFree(pointer)
15
- extend CPLVSI
16
- VSIFree(pointer)
17
- end
8
+ def CPLFree(pointer)
9
+ extend CPLVSI
10
+ VSIFree(pointer)
11
+ end
18
12
 
19
- #------------------------------------------------------------------------
20
- # cpl_port Typedefs
21
- #------------------------------------------------------------------------
22
- typedef :int, :GInt32
23
- typedef :uint, :GUInt32
24
- typedef :short, :GInt16
25
- typedef :ushort, :GUInt16
26
- typedef :uchar, :GByte
27
- typedef :int, :GBool
28
- typedef :long_long, :GIntBig
29
- typedef :ulong_long, :GUIntBig
13
+ #------------------------------------------------------------------------
14
+ # cpl_port Typedefs
15
+ #------------------------------------------------------------------------
16
+ typedef :int, :GInt32
17
+ typedef :uint, :GUInt32
18
+ typedef :short, :GInt16
19
+ typedef :ushort, :GUInt16
20
+ typedef :uchar, :GByte
21
+ typedef :int, :GBool
22
+ typedef :long_long, :GIntBig
23
+ typedef :ulong_long, :GUIntBig
30
24
 
31
- #--------------------------------------------------------------------------
32
- # Functions
33
- #--------------------------------------------------------------------------
34
- callback :CPLFileFinder, %i[string string], :string
25
+ #--------------------------------------------------------------------------
26
+ # Functions
27
+ #--------------------------------------------------------------------------
28
+ callback :CPLFileFinder, %i[string string], :string
35
29
 
36
- #---------
37
- # Config
38
- #---------
39
- attach_function :CPLVerifyConfiguration, %i[], :void
40
- attach_function :CPLGetConfigOption, %i[string string], :string
41
- attach_function :CPLSetConfigOption, %i[string string], :void
42
- attach_function :CPLSetThreadLocalConfigOption, %i[string string], :void
43
- attach_function :CPLFreeConfig, %i[], :void
30
+ #---------
31
+ # Config
32
+ #---------
33
+ attach_function :CPLVerifyConfiguration, %i[], :void
34
+ attach_function :CPLGetConfigOption, %i[string string], :string
35
+ attach_function :CPLSetConfigOption, %i[string string], :void
36
+ attach_function :CPLSetThreadLocalConfigOption, %i[string string], :void
37
+ attach_function :CPLFreeConfig, %i[], :void
44
38
 
45
- #---------
46
- # Memory
47
- #---------
48
- attach_function :CPLMalloc, %i[size_t], :pointer
49
- attach_function :CPLCalloc, %i[size_t size_t], :pointer
50
- attach_function :CPLRealloc, %i[pointer size_t], :pointer
39
+ #---------
40
+ # Memory
41
+ #---------
42
+ attach_function :CPLMalloc, %i[size_t], :pointer
43
+ attach_function :CPLCalloc, %i[size_t size_t], :pointer
44
+ attach_function :CPLRealloc, %i[pointer size_t], :pointer
51
45
 
52
- #---------
53
- # Strings
54
- #---------
55
- attach_function :CPLStrdup, %i[string], :string
56
- attach_function :CPLStrlwr, %i[string], :string
57
- attach_function :CPLFGets, %i[string int pointer], :string
58
- attach_function :CPLReadLine, %i[pointer], :string
59
- attach_function :CPLReadLineL, %i[pointer], :string
60
- attach_function :CPLReadLine2L, %i[pointer int pointer], :string
61
- attach_function :CPLAtof, %i[string], :double
62
- attach_function :CPLAtofDelim, %i[string char], :double
63
- attach_function :CPLStrtod, %i[string pointer], :double
64
- attach_function :CPLStrtodDelim, %i[string pointer char], :double
65
- attach_function :CPLStrtof, %i[string pointer], :float
66
- attach_function :CPLStrtofDelim, %i[string pointer char], :float
67
- attach_function :CPLAtofM, %i[string], :double
68
- attach_function :CPLScanString, %i[string int int int], :string
69
- attach_function :CPLScanDouble, %i[string int], :double
70
- attach_function :CPLScanLong, %i[string int], :long
71
- attach_function :CPLScanLong, %i[string int], :ulong
72
- attach_function :CPLScanUIntBig, %i[string int], :GUIntBig
73
- attach_function :CPLScanPointer, %i[string int], :pointer
74
- attach_function :CPLPrintString, %i[string string int], :int
75
- attach_function :CPLPrintStringFill, %i[string string int], :int
46
+ #---------
47
+ # Strings
48
+ #---------
49
+ attach_function :CPLStrdup, %i[string], :string
50
+ attach_function :CPLStrlwr, %i[string], :string
51
+ attach_function :CPLFGets, %i[string int pointer], :string
52
+ attach_function :CPLReadLine, %i[pointer], :string
53
+ attach_function :CPLReadLineL, %i[pointer], :string
54
+ attach_function :CPLReadLine2L, %i[pointer int pointer], :string
55
+ attach_function :CPLAtof, %i[string], :double
56
+ attach_function :CPLAtofDelim, %i[string char], :double
57
+ attach_function :CPLStrtod, %i[string pointer], :double
58
+ attach_function :CPLStrtodDelim, %i[string pointer char], :double
59
+ attach_function :CPLStrtof, %i[string pointer], :float
60
+ attach_function :CPLStrtofDelim, %i[string pointer char], :float
61
+ attach_function :CPLAtofM, %i[string], :double
62
+ attach_function :CPLScanString, %i[string int int int], :string
63
+ attach_function :CPLScanDouble, %i[string int], :double
64
+ attach_function :CPLScanLong, %i[string int], :long
65
+ attach_function :CPLScanLong, %i[string int], :ulong
66
+ attach_function :CPLScanUIntBig, %i[string int], :GUIntBig
67
+ attach_function :CPLScanPointer, %i[string int], :pointer
68
+ attach_function :CPLPrintString, %i[string string int], :int
69
+ attach_function :CPLPrintStringFill, %i[string string int], :int
76
70
 
77
- #---------
78
- # Numbers to strings
79
- #---------
80
- attach_function :CPLPrintInt32, %i[string GInt32 int], :int
81
- attach_function :CPLPrintUIntBig, %i[string GUIntBig int], :int
82
- attach_function :CPLPrintDouble, %i[string string double string], :int
83
- attach_function :CPLPrintTime, %i[string int string pointer string], :int
84
- attach_function :CPLPrintPointer, %i[string pointer int], :int
85
- attach_function :CPLGetSymbol, %i[string string], :pointer
71
+ #---------
72
+ # Numbers to strings
73
+ #---------
74
+ attach_function :CPLPrintInt32, %i[string GInt32 int], :int
75
+ attach_function :CPLPrintUIntBig, %i[string GUIntBig int], :int
76
+ attach_function :CPLPrintDouble, %i[string string double string], :int
77
+ attach_function :CPLPrintTime, %i[string int string pointer string], :int
78
+ attach_function :CPLPrintPointer, %i[string pointer int], :int
79
+ attach_function :CPLGetSymbol, %i[string string], :pointer
86
80
 
87
- #---------
88
- # Files
89
- #---------
90
- attach_function :CPLGetExecPath, %i[string int], :int
91
- attach_function :CPLGetPath, %i[string], :string
92
- attach_function :CPLGetDirname, %i[string], :string
93
- attach_function :CPLGetFilename, %i[string], :string
94
- attach_function :CPLGetBasename, %i[string], :string
95
- attach_function :CPLGetExtension, %i[string], :string
96
- attach_function :CPLGetCurrentDir, [], :string
97
- attach_function :CPLFormFilename, %i[string string string], :string
98
- attach_function :CPLFormCIFilename, %i[string string string], :string
99
- attach_function :CPLResetExtension, %i[string string], :string
100
- attach_function :CPLProjectRelativeFilename, %i[string string], :string
101
- attach_function :CPLIsFilenameRelative, %i[string], :int
102
- attach_function :CPLExtractRelativePath, %i[string string pointer], :string
103
- attach_function :CPLCleanTrailingSlash, %i[string], :string
104
- attach_function :CPLCorrespondingPaths, %i[string string pointer], :pointer
105
- attach_function :CPLCheckForFile, %i[string string], :int
106
- attach_function :CPLGenerateTempFilename, %i[string], :string
107
- attach_function :CPLFindFile, %i[string string], :string
108
- attach_function :CPLDefaultFindFile, %i[string string], :string
109
- attach_function :CPLPushFileFinder, %i[CPLFileFinder], :void
110
- attach_function :CPLPopFileFinder, %i[], :CPLFileFinder
111
- attach_function :CPLPushFinderLocation, %i[string], :void
112
- attach_function :CPLPopFinderLocation, %i[], :void
113
- attach_function :CPLFinderClean, %i[], :void
114
- attach_function :CPLStat, %i[string pointer], :int
115
- attach_function :CPLOpenShared, %i[string string int], :pointer
116
- attach_function :CPLCloseShared, %i[pointer], :void
117
- attach_function :CPLGetSharedList, %i[pointer], :pointer
118
- attach_function :CPLDumpSharedList, %i[pointer], :void
119
- attach_function :CPLCleanupSharedFileMutex, %i[], :void
81
+ #---------
82
+ # Files
83
+ #---------
84
+ attach_function :CPLGetExecPath, %i[string int], :int
85
+ attach_function :CPLGetPath, %i[string], :string
86
+ attach_function :CPLGetDirname, %i[string], :string
87
+ attach_function :CPLGetFilename, %i[string], :string
88
+ attach_function :CPLGetBasename, %i[string], :string
89
+ attach_function :CPLGetExtension, %i[string], :string
90
+ attach_function :CPLGetCurrentDir, [], :string
91
+ attach_function :CPLFormFilename, %i[string string string], :string
92
+ attach_function :CPLFormCIFilename, %i[string string string], :string
93
+ attach_function :CPLResetExtension, %i[string string], :string
94
+ attach_function :CPLProjectRelativeFilename, %i[string string], :string
95
+ attach_function :CPLIsFilenameRelative, %i[string], :int
96
+ attach_function :CPLExtractRelativePath, %i[string string pointer], :string
97
+ attach_function :CPLCleanTrailingSlash, %i[string], :string
98
+ attach_function :CPLCorrespondingPaths, %i[string string pointer], :pointer
99
+ attach_function :CPLCheckForFile, %i[string string], :int
100
+ attach_function :CPLGenerateTempFilename, %i[string], :string
101
+ attach_function :CPLFindFile, %i[string string], :string
102
+ attach_function :CPLDefaultFindFile, %i[string string], :string
103
+ attach_function :CPLPushFileFinder, %i[CPLFileFinder], :void
104
+ attach_function :CPLPopFileFinder, %i[], :CPLFileFinder
105
+ attach_function :CPLPushFinderLocation, %i[string], :void
106
+ attach_function :CPLPopFinderLocation, %i[], :void
107
+ attach_function :CPLFinderClean, %i[], :void
108
+ attach_function :CPLStat, %i[string pointer], :int
109
+ attach_function :CPLOpenShared, %i[string string int], :pointer
110
+ attach_function :CPLCloseShared, %i[pointer], :void
111
+ attach_function :CPLGetSharedList, %i[pointer], :pointer
112
+ attach_function :CPLDumpSharedList, %i[pointer], :void
113
+ #attach_function :CPLCleanupSharedFileMutex, %i[], :void
120
114
 
121
- attach_function :CPLDMSToDec, %i[string], :double
122
- attach_function :CPLDecToDMS, %i[double string int], :string
123
- attach_function :CPLPackedDMSToDec, %i[double], :double
124
- attach_function :CPLDecToPackedDMS, %i[double], :string
125
- attach_function :CPLStringToComplex, %i[string pointer pointer], :void
126
- attach_function :CPLUnlinkTree, %i[string], :int
127
- attach_function :CPLCopyFile, %i[string string], :int
128
- attach_function :CPLMoveFile, %i[string string], :int
115
+ attach_function :CPLDMSToDec, %i[string], :double
116
+ attach_function :CPLDecToDMS, %i[double string int], :string
117
+ attach_function :CPLPackedDMSToDec, %i[double], :double
118
+ attach_function :CPLDecToPackedDMS, %i[double], :string
119
+ attach_function :CPLStringToComplex, %i[string pointer pointer], :void
120
+ attach_function :CPLUnlinkTree, %i[string], :int
121
+ attach_function :CPLCopyFile, %i[string string], :int
122
+ attach_function :CPLMoveFile, %i[string string], :int
129
123
 
130
- #---------
131
- # Zip Files
132
- #---------
133
- attach_function :CPLCreateZip, %i[string pointer], :pointer
134
- attach_function :CPLCreateFileInZip, %i[pointer string pointer], CPLErr
135
- attach_function :CPLWriteFileInZip, %i[pointer pointer int], CPLErr
136
- attach_function :CPLCloseFileInZip, %i[pointer], CPLErr
137
- attach_function :CPLCloseZip, %i[pointer], CPLErr
138
- attach_function :CPLZLibDeflate,
139
- %i[pointer size_t int pointer size_t pointer],
140
- :pointer
141
- attach_function :CPLZLibInflate,
142
- %i[pointer size_t pointer size_t pointer],
143
- :pointer
124
+ #---------
125
+ # Zip Files
126
+ #---------
127
+ #attach_function :CPLCreateZip, %i[string pointer], :pointer
128
+ #attach_function :CPLCreateFileInZip, %i[pointer string pointer], CPLErr
129
+ #attach_function :CPLWriteFileInZip, %i[pointer pointer int], CPLErr
130
+ #attach_function :CPLCloseFileInZip, %i[pointer], CPLErr
131
+ #attach_function :CPLCloseZip, %i[pointer], CPLErr
132
+ #attach_function :CPLZLibDeflate,
133
+ # %i[pointer size_t int pointer size_t pointer],
134
+ # :pointer
135
+ #attach_function :CPLZLibInflate,
136
+ # %i[pointer size_t pointer size_t pointer],
137
+ # :pointer
144
138
 
145
- attach_function :CPLValidateXML, %i[string string pointer], :int
146
- attach_function :CPLsetlocale, %i[int string], :string
139
+ #attach_function :CPLValidateXML, %i[string string pointer], :int
140
+ #attach_function :CPLsetlocale, %i[int string], :string
147
141
 
148
- attach_function :CPLCleanupSetlocaleMutex, %i[], :void
149
- end
142
+ #attach_function :CPLCleanupSetlocaleMutex, %i[], :void
150
143
  end
151
144
  end