-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove work done in LibGMT.__init__ (#178)
The shared library was being loaded in `__init__`, which is not a good design pattern. Instead, now it's loaded the first time it gets used by the new method `get_libgmt_func` that gets the ctypes function and sets the return and argument types. This removes some redundancy from the other methods (setting ctypes type conversions) and also removes the usage of a private variable `_libgmt` from other methods. Now, only methods that set a private variable need to know of it's existence. The same applies to `_session_id` which is entirely encapsulated by `current_session`.
- Loading branch information
Showing
3 changed files
with
132 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters