summaryrefslogtreecommitdiff
path: root/ext/ffi_c/DynamicLibrary.c
Commit message (Collapse)AuthorAgeFilesLines
* Implement the last missing Write Barriers and dsizeJean Boussier2023-03-061-3/+11
| | | | | | | | | | | | | | Ref: https://github.com/ffi/ffi/pull/991 Write barrier protected objects are allowed to be promoted to the old generation, which means they only get marked on major GC. The downside is that the RB_BJ_WRITE macro MUST be used to set references, otherwise the referenced object may be garbaged collected. This commit also implement a `dsize` function so that these instance report a more relevant size in various memory profilers. It's not counting everything because some types are opaque right now, so a larger refactoring would be needed.
* Merge branch 'master' of github.com:ffi/ffiLars Kanis2023-03-061-10/+16
|\
| * Implement Write Barrier and dsize for FFI::DynamicLibraryJean Boussier2023-03-061-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And FFI::DynamicLibrary::Symbol Ref: https://github.com/ffi/ffi/pull/991 Write barrier protected objects are allowed to be promoted to the old generation, which means they only get marked on major GC. The downside is that the RB_BJ_WRITE macro MUST be used to set references, otherwise the referenced object may be garbaged collected. This commit also implement a `dsize` function so that these instance report a more relevant size in various memory profilers. It's not counting everything because some types are opaque right now, so a larger refactoring would be needed. While I was at it, I moved `Symbol.library` into the unused `Symbol.base.rbParent` which seemed appropriate and saves a pointer.
* | Fix class name of Symbol#inspectLars Kanis2023-03-061-1/+1
|/
* Convert FFI::DynamicLibrary to TypedDataLars Kanis2023-03-031-7/+19
| | | | | | | Ref: ffi#991 The old untyped DATA API is soft deprecated and this new one open the door to write barriers, compaction, memsize etc.
* Convert FFI::AbstractMemory and descendants to TypedDataJean Boussier2023-03-021-5/+18
| | | | | | | Ref: https://github.com/ffi/ffi/pull/991 The old untyped DATA API is soft deprecated and this new one open the door to write barriers, compaction, memsize etc.
* Remove win32/stdint.h and stdbool.hLars Kanis2020-09-231-6/+1
| | | | | | | | Only very old Visual-C compilers before 2010 didn't contain these files. Since the copyright of the included files conflicts with ffi's license, we better remove it. Fixes #693
* Remove taint supportyuuji.yaginuma2019-11-251-1/+1
| | | | | | | | | | Ruby 2.7 deprecates taint and it no longer has an effect. https://bugs.ruby-lang.org/issues/16131 The APIs related to taint cause deprecation warning message and the lack of taint support should not cause a problem in previous Ruby versions. So I removed that. But if need to taint support that to old versions of Ruby, I will update PR.
* Add missing shlwapi.h includeHiroshi Hatake2017-01-241-0/+1
|
* Avoid undefined behaviour of LoadLibrary() on Windows.Lars Kanis2017-01-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | According to [1] the flag LOAD_WITH_ALTERED_SEARCH_PATH should be used with absolute paths only. It has the effect, that the path of the DLL to be loaded is temporary added to the search path, so that dependent DLLs in the same directory can be found and loaded implicit. However for relative paths the standard LoadLibrary() search order should be used, because the behaviour of LOAD_WITH_ALTERED_SEARCH_PATH isn't defined for relative paths. In practice (on Windows 10) relative paths to Windows system DLLs do work, so that the library is loaded, but DLLs in other search paths are not found, when this flag is set. Ruby's fiddle library uses LoadLibrary without flags in both cases. [1] https://msdn.microsoft.com/en-us/library/windows/desktop/ms684179(v=vs.85).aspx
* add correct RTLD constants at compile timetduehr2014-02-191-5/+9
|
* Fix bad search and replace in C code.1.9.2Charles Oliver Nutter2013-10-291-1/+0
|
* Switch license to BSD throughout codebase. See #288.Charles Oliver Nutter2013-10-291-12/+22
|
* DynamicLibrary.c: Avoiding dlsym(dlopen(0,0), sym)Paul Kunysch2013-02-121-0/+9
| | | | Signed-off-by: Wayne Meissner <wmeissner@gmail.com>
* DynamicLibrary.c: Avoid win32 APIs on cygwin.Paul Kunysch2013-02-121-3/+3
| | | | Signed-off-by: Wayne Meissner <wmeissner@gmail.com>
* Convert C++ style comments to C /* */ styleWayne Meissner2012-08-041-2/+2
|
* Mods to fix compilation on i386-mingw32Wayne Meissner2012-02-021-3/+1
|
* Move stdint.h to seperate pathPark Heesob2012-01-141-1/+1
|
* initial releaseunknown2012-01-091-1/+9
|
* Add documentation for ArrayType, Buffer, DynamicLibrary, Function, Enum, EnumsSylvain Daubert2011-09-251-0/+56
| | | | and ConstGenerator.
* Add documentation for DataConverter, LastError, AutoPointer, FFI::IO, ↵Sylvain Daubert2011-09-211-0/+6
| | | | Library, Platform and FFI class methods from types.rb.
* _WINSOCKAPI_ has to be defined before including <windows.h> to avoid ↵Charlie Savage2011-08-171-1/+2
| | | | redefiniction errors.
* Fixup subclasses of PointerWayne Meissner2011-03-261-6/+17
|
* Add Struct#order and Pointer#order to swap endian-nessWayne Meissner2010-08-201-1/+21
|
* Remove the MemoryOps pointer from every AbstractMemory objectWayne Meissner2009-11-271-1/+0
|
* Remove AbstractMemory#put_callbackWayne Meissner2009-08-131-0/+2
|
* Add access flags to AbstractMemory and check them on every accessWayne Meissner2009-07-301-0/+1
|
* Rework the naming a bit.Wayne Meissner2009-05-061-24/+24
|
* Pass the ffi module into each of the _Init functionsWayne Meissner2009-05-061-2/+1
|
* Use rb_global_variable() for more globalsWayne Meissner2009-05-061-0/+2
|
* Rename NativeLibrary.[ch] to DynamicLibrary.[ch]Wayne Meissner2009-04-161-0/+212