Pyobjus bug

32 views
Skip to first unread message

Ron Maeder

unread,
Jun 24, 2014, 10:04:08 PM6/24/14
to pyjni...@googlegroups.com
Does anyone know where I can post about a bug in Pyobjus?

--------

I ran into some cases where the method type string returned did not have any digits in it (perhaps a bug somewhere).  I needed to patch Pyobjus with:

--- pyobjus.pyx 2014-04-17 14:05:17.000000000 -0700

+++ /Users/ron/BAK/pyobjus.pyx.NEW 2014-04-17 14:03:12.000000000 -0700

@@ -470,7 +470,11 @@

     cdef Method* class_methods = class_copyMethodList(cls, &num_methods)

     main_cls_name = main_cls_name or class_getName(cls)

     for i in xrange(num_methods):

-        py_name, converted_method = objc_method_to_py(class_methods[i], main_cls_name, static)

+        try:

+            py_name, converted_method = objc_method_to_py(class_methods[i], main_cls_name, static)

+        except IndexError as e:

+            print 'Warning: Pyobjus: objc_method_to_py(%s_%s): %s' % (main_cls_name, sel_getName(method_getName(class_methods[i])), e)

+            continue

         if py_name not in tmp_properties_keys:

             methods[py_name] = converted_method

         else:

------------

Ron

Ben Rousch

unread,
Jun 24, 2014, 10:11:02 PM6/24/14
to pyjni...@googlegroups.com


--
You received this message because you are subscribed to the Google Groups "PyJNIus development ML" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyjnius-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
 Ben Rousch
   bro...@gmail.com
   http://clusterbleep.net/
Reply all
Reply to author
Forward
0 new messages