Commits

squeaky committed 6c9ab6f

remove simple_call bridge artifact

  • Participants
  • Parent commits 70f0b99
  • Branches bridge-remove

Comments (0)

Files changed (7)

File pystacia/api/__init__.py

             logger.debug('Cleaning up traced instances')
             _cleanup()
             
-            simple_call(None, 'terminus')
+            c_call(None, 'terminus')
             
             logger.debug('Shutting down the bridge')
         
         logger.debug('Critical section - init MagickWand')
         with __lock:
             if not dll.__inited:
-                simple_call(None, 'genesis', __init=False)
+                c_call(None, 'genesis', __init=False)
                 
                 logger.debug('Registering atexit handler')
                 atexit.register(shutdown)
 from pystacia.compat import formattable
 from pystacia.common import _cleanup
 from pystacia import magick
-from pystacia.api.func import simple_call
+from pystacia.api.func import c_call
 
 
 min_version = (6, 5, 9, 0)

File pystacia/api/func.py

     }
 
 
-def simple_call(obj, method, *args, **kw):
-    return c_call(obj, method, *args, **kw)
-
-
 def get_c_method(obj, method, throw=True):
     if hasattr(obj.__class__, '_api_type'):
         api_type = obj.__class__._api_type

File pystacia/api/tests/func_tests.py

         img = sample()
         
         self.assertRaises(PystaciaException,
-                          lambda: simple_call('magick', 'set_format',
+                          lambda: c_call('magick', 'set_format',
                                               img, 'lolz'))
-        simple_call('magick', 'set_format', img, 'bmp')
+        c_call('magick', 'set_format', img, 'bmp')
         
         img.close()
         
         self.assertFalse(get_c_method('magick', 'non_existant', throw=False))
 
 from pystacia.tests.common import sample
-from pystacia.api.func import simple_call, get_c_method
+from pystacia.api.func import c_call, get_c_method
 from pystacia.util import PystaciaException

File pystacia/color/_impl.py

 def alloc():
-    return simple_call('pwand', 'new')
+    return c_call('pwand', 'new')
 
 
 def free(color):
-    return simple_call('pwand', 'destroy', color)
+    return c_call('pwand', 'destroy', color)
 
 
 def clone(color):
-    return simple_call('pwand', 'clone', color)
+    return c_call('pwand', 'clone', color)
 
 
 def set_string(color, value):
 
 from ctypes import c_double
 
-from pystacia.api.func import simple_call, c_call
+from pystacia.api.func import c_call

File pystacia/image/__init__.py

         if enum:
             value = enum_lookup(value, enum)
             
-        simple_call(self, ('set', key), value)
+        c_call(self, ('set', key), value)
         
     def _get_state(self, key, enum=None):
-        value = simple_call(self, ('get', key))
+        value = c_call(self, ('get', key))
             
         if enum:
             value = enum_reverse_lookup(enum, value)
 from pystacia.compat import formattable
 from pystacia import color
 color_module = color
-from pystacia.api.func import simple_call
+from pystacia.api.func import c_call
 from pystacia import magick
 from pystacia.api.enum import (lookup as enum_lookup,
                                reverse_lookup as enum_reverse_lookup)
     'generic',
     'sample',
     'registry',
-    'simple_call',
     'magick',
     'enum_lookup',
     'enum_reverse_lookup',

File pystacia/image/_impl/__init__.py

 def alloc(image):
-    return simple_call('wand', 'new')
+    return c_call('wand', 'new')
 
 
 def free(image):
-    return simple_call('wand', 'destroy', image)
+    return c_call('wand', 'destroy', image)
 
 
 def clone(image):
-    return simple_call('wand', 'clone', image)
+    return c_call('wand', 'clone', image)
 
 
-from pystacia.api.func import simple_call
+from pystacia.api.func import c_call

File pystacia/magick/__init__.py

 
 @memoized
 def get_version_str():
-    return simple_call('magick_', 'get_version', None)
+    return c_call('magick_', 'get_version', None)
 
 
 @memoized
     from xml.etree.ElementTree import ElementTree  # @Reimport
 
 from pystacia.api import get_dll
-from pystacia.api.func import simple_call
+from pystacia.api.func import c_call
 from pystacia.magick import _impl as impl