Comments (7)
Maybe add another function called library_load_fullname/fullpath or something like that where the user has to provide a fully formated path instead.
Of course it's your library so you do as you wish of course :)
from foundation_lib.
Good catch, that particular code is an migration from another codebase and some legacy got included. Will clean it up.
from foundation_lib.
Thanks :)
from foundation_lib.
I've cleaned up the fallback, which makes sense in that the idea is to be able to call library_load( "foo" ) without having to worry about platform specific prefix/suffix.
The fallback now only triggers if the platform extension is not present, and the fallback adds the prefix/suffix on the file name, preserving paths. It always tries to load the given name first, unmodified.
Check out https://github.com/rampantpixels/foundation_lib/tree/feature/library-load and see if you agree it's a reasonable implementation
from foundation_lib.
Looks good. Something that might be worth considering checking is for backslashes in the path here (on Windows)
https://github.com/rampantpixels/foundation_lib/blob/feature/library-load/foundation/library.c#L100
I really don't use that myself but I can see that other people will.
from foundation_lib.
Merged in 8194e3b
from foundation_lib.
Tested this now and works as expected. Thanks!
Might be good to add some more tests to validate the code (as you already have really good tests for most of the code)
from foundation_lib.
Related Issues (20)
- Case insensible compare functions HOT 5
- Support for killing process HOT 4
- random32_range(0, 1) doesn't return 1 HOT 2
- Problems building foundation_lib using MSYS2 (MinGW) HOT 11
- What about closed/commercial project HOT 3
- build ? HOT 2
- Shared memory HOT 1
- Python3 compatibility HOT 6
- Lots of errors on Travis for macOS HOT 4
- Build errors on OSX/iOS HOT 13
- Dead link HOT 1
- Thread Pool support HOT 1
- Consider remove PNaCl support HOT 6
- Why this library? Why C for game? HOT 2
- Maybe a bug in POSIX fs_is_file HOT 2
- Question: why use objectmap for refcount objects HOT 5
- tests crash on VS2013 when building as debug and release HOT 7
- CMake support? HOT 2
- Typo HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from foundation_lib.