beezwax 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
@@ -14,21 +14,32 @@ module Btrieve
14
14
  end
15
15
 
16
16
  attach_function :BTRCALLID, [:int, :pointer, :pointer, :pointer, :pointer, :uchar, :uchar, :pointer], :int
17
-
17
+
18
18
  def btr_op(session, ops, pos_buffer, data_buffer, key_buffer, key_number, valid_return_codes=[0])
19
- data_length = [data_buffer.size].pack('L')
20
- key_length = key_buffer.size
21
- result_code = BTRCALLID(ops, pos_buffer, data_buffer, data_length, key_buffer, key_length, key_number, session.client_id)
22
- unless valid_return_codes.include?(result_code)
23
- p "ops=#{ops} data_buffer.length=#{data_buffer.length} key_buffer=#{key_buffer}, key_buffer.length=#{key_buffer.length}, key_number=#{key_number}, session.client_id=#{session.client_id}"
24
- raise Exception.new("PSQL Exception Code #{result_code} - #{EXCEPTION_MESSAGES[result_code]}")
25
- end
19
+ #result_code=nil
20
+ #dir_voodoo(session) do
21
+ data_length = [data_buffer.size].pack('L')
22
+ key_length = key_buffer.size
23
+ result_code = BTRCALLID(ops, pos_buffer, data_buffer, data_length, key_buffer, key_length, key_number, session.client_id)
24
+ unless valid_return_codes.include?(result_code)
25
+ p "ops=#{ops} data_buffer.length=#{data_buffer.length} key_buffer=#{key_buffer}, key_buffer.length=#{key_buffer.length}, key_number=#{key_number}, session.client_id=#{session.client_id}"
26
+ raise Exception.new("PSQL Exception Code #{result_code} - #{EXCEPTION_MESSAGES[result_code]}")
27
+ end
28
+ #end
26
29
  result_code
27
30
  end
28
31
 
29
32
  def self.create_string_buffer(size)
30
33
  0.chr*(size)
31
34
  end
35
+
36
+ #def dir_voodoo(session)
37
+ # wd=Dir.pwd
38
+ # Dir.chdir(session.pathname)
39
+ # yield
40
+ # Dir.chdir(wd)
41
+ #end
42
+
32
43
  end
33
44
 
34
45
  module Timer
@@ -36,7 +36,6 @@ class BtrieveSession
36
36
  private
37
37
 
38
38
  def initialize(pathname)
39
- before_wd=Dir.pwd
40
39
  @cache = {}
41
40
  @model_classes = {}
42
41
  @table_cache = {}
@@ -45,7 +44,6 @@ class BtrieveSession
45
44
  btr_op(self, SET_DIRECTORY, NULL_BUFFER, NULL_BUFFER, @pathname, NULL_KEY)
46
45
  @btrieve_schema = BtrieveSchema.new(self)
47
46
  @btrieve_meta = BtrieveMeta.new(self)
48
- Dir.chdir(before_wd)
49
47
  end
50
48
  end
51
49
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beezwax
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Patrick Lardin