[pypy-commit] cffi default: Rename: _ffi_backend => _cffi_backend

arigo noreply at buildbot.pypy.org
Wed Jun 27 10:49:34 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r536:232154d5eb11
Date: 2012-06-27 10:49 +0200
http://bitbucket.org/cffi/cffi/changeset/232154d5eb11/

Log:	Rename: _ffi_backend => _cffi_backend

diff --git a/c/_ffi_backend.c b/c/_cffi_backend.c
rename from c/_ffi_backend.c
rename to c/_cffi_backend.c
--- a/c/_ffi_backend.c
+++ b/c/_cffi_backend.c
@@ -231,7 +231,7 @@
 
 static PyTypeObject CTypeDescr_Type = {
     PyVarObject_HEAD_INIT(NULL, 0)
-    "_ffi_backend.CTypeDescr",
+    "_cffi_backend.CTypeDescr",
     offsetof(CTypeDescrObject, ct_name),
     sizeof(char),
     (destructor)ctypedescr_dealloc,             /* tp_dealloc */
@@ -299,7 +299,7 @@
 
 static PyTypeObject CField_Type = {
     PyVarObject_HEAD_INIT(NULL, 0)
-    "_ffi_backend.CField",
+    "_cffi_backend.CField",
     sizeof(CFieldObject),
     0,
     (destructor)cfield_dealloc,                 /* tp_dealloc */
@@ -1607,7 +1607,7 @@
 
 static PyTypeObject CData_Type = {
     PyVarObject_HEAD_INIT(NULL, 0)
-    "_ffi_backend.CData",
+    "_cffi_backend.CData",
     sizeof(CDataObject),
     0,
     (destructor)cdata_dealloc,                  /* tp_dealloc */
@@ -1636,7 +1636,7 @@
 
 static PyTypeObject CDataOwning_Type = {
     PyVarObject_HEAD_INIT(NULL, 0)
-    "_ffi_backend.CDataOwn",
+    "_cffi_backend.CDataOwn",
     sizeof(CDataObject_own_base),
     0,
     (destructor)cdataowning_dealloc,            /* tp_dealloc */
@@ -1697,7 +1697,7 @@
 
 static PyTypeObject CDataIter_Type = {
     PyVarObject_HEAD_INIT(NULL, 0)
-    "_ffi_backend.CDataIter",               /* tp_name */
+    "_cffi_backend.CDataIter",              /* tp_name */
     sizeof(CDataIterObject),                /* tp_basicsize */
     0,                                      /* tp_itemsize */
     /* methods */
@@ -2065,7 +2065,7 @@
 
 static PyTypeObject dl_type = {
     PyVarObject_HEAD_INIT(NULL, 0)
-    "_ffi_backend.Library",             /* tp_name */
+    "_cffi_backend.Library",            /* tp_name */
     sizeof(DynLibObject),               /* tp_basicsize */
     0,                                  /* tp_itemsize */
     /* methods */
@@ -3578,7 +3578,7 @@
 
 /************************************************************/
 
-void init_ffi_backend(void)
+void init_cffi_backend(void)
 {
     PyObject *m, *v;
 
@@ -3591,7 +3591,7 @@
         return;
     }
 
-    m = Py_InitModule("_ffi_backend", FFIBackendMethods);
+    m = Py_InitModule("_cffi_backend", FFIBackendMethods);
     if (m == NULL)
         return;
     if (PyType_Ready(&dl_type) < 0)
diff --git a/cffi/api.py b/cffi/api.py
--- a/cffi/api.py
+++ b/cffi/api.py
@@ -37,7 +37,7 @@
         from . import cparser
         if backend is None:
             try:
-                import _ffi_backend as backend
+                import _cffi_backend as backend
             except ImportError, e:
                 import warnings
                 warnings.warn("ImportError: %s\n"
diff --git a/cffi/verifier.py b/cffi/verifier.py
--- a/cffi/verifier.py
+++ b/cffi/verifier.py
@@ -24,10 +24,10 @@
         an instance.  Finally, we copy all the API elements from
         the module to the class or the instance as needed.
         """
-        import _ffi_backend
-        if self.ffi._backend is not _ffi_backend:
+        import _cffi_backend
+        if self.ffi._backend is not _cffi_backend:
             raise NotImplementedError(
-                "verify() is only available for the _ffi_backend")
+                "verify() is only available for the _cffi_backend")
 
         modname = ffiplatform.undercffi_module_name()
         tmpdir = ffiplatform.tmpdir()
@@ -639,7 +639,7 @@
 
 static void _cffi_init(void)
 {
-    PyObject *module = PyImport_ImportModule("_ffi_backend");
+    PyObject *module = PyImport_ImportModule("_cffi_backend");
     PyObject *c_api_object;
 
     if (module == NULL)
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@
 import errno
 
 
-sources = ['c/_ffi_backend.c']
+sources = ['c/_cffi_backend.c']
 libraries = ['ffi']
 include_dirs = []
 
@@ -63,7 +63,7 @@
             "fast c backend for cpython",
             standard='__pypy__' not in sys.modules,
             ext_modules=[
-                Extension(name='_ffi_backend',
+                Extension(name='_cffi_backend',
                           include_dirs=include_dirs,
                           sources=sources,
                           libraries=libraries),
diff --git a/setup_base.py b/setup_base.py
--- a/setup_base.py
+++ b/setup_base.py
@@ -7,7 +7,7 @@
 if __name__ == '__main__':
     from distutils.core import setup
     from distutils.extension import Extension
-    setup(ext_modules=[Extension(name = '_ffi_backend',
+    setup(ext_modules=[Extension(name = '_cffi_backend',
                                  include_dirs=include_dirs,
                                  sources=sources,
                                  libraries=libraries,
diff --git a/testing/test_ffi_backend.py b/testing/test_ffi_backend.py
--- a/testing/test_ffi_backend.py
+++ b/testing/test_ffi_backend.py
@@ -6,7 +6,7 @@
     py.test.skip("C backend tests are CPython only")
 
 from testing import backend_tests, test_function, test_ownlib
-import _ffi_backend
+import _cffi_backend
 
 
 class TestFFI(backend_tests.BackendTests,
@@ -16,4 +16,4 @@
 
     @staticmethod
     def Backend():
-        return _ffi_backend
+        return _cffi_backend


More information about the pypy-commit mailing list