rubyosa19 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
data/ext/rubyosa/rbosa.c CHANGED
@@ -135,7 +135,7 @@ rbosa_element_new (VALUE self, VALUE type, VALUE value)
135
135
  FourCharCode ffc_type;
136
136
  OSErr error;
137
137
  const char * c_value;
138
- unsigned c_value_size;
138
+ unsigned long c_value_size;
139
139
  AEDesc desc;
140
140
 
141
141
  ffc_type = RVAL2FOURCHAR (type);
@@ -259,7 +259,7 @@ __rbosa_raise_potential_app_error (AEDesc *reply)
259
259
 
260
260
  AEDisposeDesc (&errorNumDesc);
261
261
 
262
- rb_raise (rb_eRuntimeError, exception);
262
+ rb_raise (rb_eRuntimeError, "Exception: %s", exception);
263
263
  }
264
264
 
265
265
  static VALUE
@@ -588,7 +588,7 @@ __rbosa_elementlist_get (VALUE self, long index, AEKeyword *keyword)
588
588
  &desc);
589
589
 
590
590
  if (error != noErr)
591
- rb_raise (rb_eRuntimeError, "Cannot get desc at index %d : %s (%d)",
591
+ rb_raise (rb_eRuntimeError, "Cannot get desc at index %ld : %s (%d)",
592
592
  index, error_code_to_string (error), error);
593
593
 
594
594
  return rbosa_element_make (cOSAElement, &desc, rb_ivar_get (self, sApp));
@@ -615,7 +615,7 @@ __rbosa_elementrecord_set (VALUE key, VALUE value, AEDescList *list)
615
615
  error = AEPutKeyDesc (list, RVAL2FOURCHAR (key), rbosa_element_aedesc (value));
616
616
  if (error != noErr)
617
617
  rb_raise (rb_eRuntimeError, "Cannot set value %p for key %p of record %p: %s (%d)",
618
- value, key, list, error_code_to_string (error), error);
618
+ (void *)value, (void *)key, list, error_code_to_string (error), error);
619
619
 
620
620
  return ST_CONTINUE;
621
621
  }
@@ -29,7 +29,7 @@
29
29
  #include <ApplicationServices/ApplicationServices.h>
30
30
  #include <CoreFoundation/CoreFoundation.h>
31
31
  #include <unistd.h>
32
- #include <st.h>
32
+ #include <ruby/st.h>
33
33
  #include "rbosa.h"
34
34
 
35
35
  static void
@@ -344,7 +344,7 @@ rbosa_scripting_info (VALUE self, VALUE hash)
344
344
  CFDataRef sdef_data;
345
345
 
346
346
  if (!rbosa_translate_app (criterion, value, &signature, &name, &fs, &error))
347
- rb_raise (rb_eRuntimeError, error);
347
+ rb_raise (rb_eRuntimeError, "Error translating: %s", error);
348
348
 
349
349
  osa_error = OSACopyScriptingDefinition (&fs, kOSAModeNull, &sdef_data);
350
350
  if (osa_error != noErr)
@@ -374,7 +374,7 @@ rbosa_remote_processes (VALUE self, VALUE machine)
374
374
  CFArrayRef cfary;
375
375
  CFStreamError cferr;
376
376
  VALUE ary;
377
- unsigned i, count;
377
+ unsigned long i, count;
378
378
 
379
379
  snprintf (buf, sizeof buf, "eppc://%s", RVAL2CSTR (machine));
380
380
  str = CFStringCreateWithCString (kCFAllocatorDefault, buf, kCFStringEncodingUTF8);
@@ -387,7 +387,7 @@ rbosa_remote_processes (VALUE self, VALUE machine)
387
387
  if (cfary == NULL) {
388
388
  AEDisposeRemoteProcessResolver (resolver);
389
389
  rb_raise (rb_eRuntimeError, "Can't resolve the remote processes on machine '%s' : error %d (domain %d)",
390
- RVAL2CSTR (machine), cferr.error, cferr.domain);
390
+ RVAL2CSTR (machine), cferr.error, (int)cferr.domain);
391
391
  }
392
392
 
393
393
  ary = rb_ary_new ();
data/lib/rubyosa/rbosa.rb CHANGED
@@ -23,6 +23,8 @@
23
23
  # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24
24
  # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25
25
  # POSSIBILITY OF SUCH DAMAGE.
26
+ warn "!!!!!"
27
+ puts "Desired class: " + @desired_class::CODE
26
28
 
27
29
  require 'date'
28
30
  require 'uri'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyosa19
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2012-04-19 00:00:00.000000000 Z
16
+ date: 2012-04-20 00:00:00.000000000 Z
17
17
  dependencies: []
18
18
  description: This is a modernization of the glorious but unmaintained rubyosa version,
19
19
  aimed at making it compatible with ruby 1.9.x series. At the moment, it successfully