diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-09-13 21:26:21 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-09-13 21:28:04 -0500 |
commit | e1b2d3cb863e5d157da1c1766dc3f86ac3bb29e9 (patch) | |
tree | 91f6aa160fb8a23c99eec76b1866423bcc337126 | |
parent | 39a45c5741ea5c62af2fd530d8fb3ebc2055116a (diff) | |
download | cryptography-e1b2d3cb863e5d157da1c1766dc3f86ac3bb29e9.tar.gz cryptography-e1b2d3cb863e5d157da1c1766dc3f86ac3bb29e9.tar.bz2 cryptography-e1b2d3cb863e5d157da1c1766dc3f86ac3bb29e9.zip |
remove import function, rename attrs to upper in modules
-rw-r--r-- | cryptography/bindings/openssl/api.py | 13 | ||||
-rw-r--r-- | cryptography/bindings/openssl/evp.py | 6 | ||||
-rw-r--r-- | cryptography/bindings/openssl/opensslv.py | 6 |
3 files changed, 9 insertions, 16 deletions
diff --git a/cryptography/bindings/openssl/api.py b/cryptography/bindings/openssl/api.py index c5da9fb1..bc2b4ae4 100644 --- a/cryptography/bindings/openssl/api.py +++ b/cryptography/bindings/openssl/api.py @@ -44,16 +44,9 @@ class API(object): for name in self._modules: __import__('cryptography.bindings.openssl.' + name) module = sys.modules['cryptography.bindings.openssl.' + name] - self._import_definitions(module, 'includes') - self._import_definitions(module, 'types') - self._import_definitions(module, 'functions') - - def _import_definitions(self, module, name): - """ - Import definitions named definitions from module - """ - container = getattr(self, name) - container.append(getattr(module, name)) + self.includes.append(module.INCLUDES) + self.types.append(module.TYPES) + self.functions.append(module.FUNCTIONS) def _define(self): for typedef in self.types: diff --git a/cryptography/bindings/openssl/evp.py b/cryptography/bindings/openssl/evp.py index 0d969cf8..7795e935 100644 --- a/cryptography/bindings/openssl/evp.py +++ b/cryptography/bindings/openssl/evp.py @@ -11,17 +11,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -includes = """ +INCLUDES = """ #include <openssl/evp.h> """ -types = """ +TYPES = """ typedef struct { ...; } EVP_CIPHER_CTX; typedef ... EVP_CIPHER; typedef ... ENGINE; """ -functions = """ +FUNCTIONS = """ void OpenSSL_add_all_algorithms(); const EVP_CIPHER *EVP_get_cipherbyname(const char *); int EVP_EncryptInit_ex(EVP_CIPHER_CTX *, const EVP_CIPHER *, diff --git a/cryptography/bindings/openssl/opensslv.py b/cryptography/bindings/openssl/opensslv.py index ace7bded..a8f0b9b8 100644 --- a/cryptography/bindings/openssl/opensslv.py +++ b/cryptography/bindings/openssl/opensslv.py @@ -11,13 +11,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -includes = """ +INCLUDES = """ #include <openssl/opensslv.h> """ -types = """ +TYPES = """ static char *const OPENSSL_VERSION_TEXT; """ -functions = "" +FUNCTIONS = "" |