gphoto4ruby 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.2.5
2
+
3
+ * Another bug with memory allocation fixed
4
+
1
5
  == 0.2.4
2
6
 
3
7
  * fixed memory allocation bug with CameraFilePath pointer
data/ext/gphoto2camera.c CHANGED
@@ -51,13 +51,6 @@ VALUE camera_allocate(VALUE klass) {
51
51
  return Data_Wrap_Struct(klass, camera_mark, camera_free, c);
52
52
  }
53
53
 
54
- void camera_event_mark(GPhoto2CameraEvent *ce) {
55
- }
56
-
57
- void camera_event_free(GPhoto2CameraEvent *ce) {
58
- free(ce);
59
- }
60
-
61
54
  /*
62
55
  * call-seq:
63
56
  * GPhoto2::Camera.new(port=nil)
@@ -959,8 +952,9 @@ VALUE camera_wait(int argc, VALUE *argv, VALUE self) {
959
952
  switch (ce->type) {
960
953
  case GP_EVENT_FILE_ADDED:
961
954
  case GP_EVENT_FOLDER_ADDED:
962
- c->path = (CameraFilePath*)evtData;
963
- ce->path = c->path;
955
+ ce->path = (CameraFilePath*)evtData;
956
+ free(c->path);
957
+ c->path = ce->path;
964
958
  strcpy(c->virtFolder, c->path->folder);
965
959
  gp_result_check(gp_camera_wait_for_event(c->camera, 100, &fakeType, &fakeData, c->context));
966
960
  break;
@@ -22,6 +22,13 @@
22
22
 
23
23
  #include "gphoto2camera_event.h"
24
24
 
25
+ void camera_event_mark(GPhoto2CameraEvent *ce) {
26
+ }
27
+
28
+ void camera_event_free(GPhoto2CameraEvent *ce) {
29
+ free(ce);
30
+ }
31
+
25
32
  /*
26
33
  * call-seq:
27
34
  * type => string
@@ -38,6 +38,9 @@ VALUE rb_cGPhoto2CameraEvent;
38
38
  #define EVENT_FILE_ADDED rb_str_new2("file added")
39
39
  #define EVENT_FOLDER_ADDED rb_str_new2("folder added")
40
40
 
41
+ void camera_event_mark(GPhoto2CameraEvent *ce);
42
+ void camera_event_free(GPhoto2CameraEvent *ce);
43
+
41
44
  VALUE camera_event_type(VALUE self);
42
45
  VALUE camera_event_file(VALUE self);
43
46
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gphoto4ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - heq4 company