-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
port ctypes-foreign to use virtual modules
This turns ctypes-foreign.threaded/unthreaded into variant libraries that implement the `foreign.mli` that is exposed by the ctypes_foreign library. The Makefile infrastructure did this by duplicating foreign.mli and using -no-keep-locs. The dune-based approach is a bit more high-level as it verifies that there is no extra module leakage aside from the virtual modules' cmi that are exposed. Also add ppx_bisect conditionally while in here.
- Loading branch information
Showing
13 changed files
with
21 additions
and
108 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
(lang dune 1.0) | ||
(name ctypes) | ||
(lang dune 1.7) | ||
(name ctypes) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
(executables | ||
(names date) | ||
(libraries ctypes-foreign)) | ||
(libraries ctypes-foreign.threaded)) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
(executables | ||
(names fts_cmd) | ||
(libraries ctypes-foreign)) | ||
(libraries ctypes-foreign.threaded)) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
(library | ||
(name ctypes_stubs) | ||
(public_name ctypes.stubs) | ||
(preprocess (pps bisect_ppx -conditional)) | ||
(wrapped false) | ||
(libraries ctypes str)) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
(library | ||
(name ctypes_foreign_threaded) | ||
(public_name ctypes-foreign.threaded) | ||
(wrapped false) | ||
(libraries ctypes ctypes-foreign.base threads) | ||
(preprocess (pps bisect_ppx -conditional)) | ||
(libraries ctypes threads) | ||
(private_modules Ctypes_foreign_threaded_stubs) | ||
(implements ctypes_foreign) | ||
(c_names foreign_threaded_stubs)) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
(library | ||
(name ctypes_foreign_unthreaded) | ||
(public_name ctypes-foreign.unthreaded) | ||
(wrapped false) | ||
(libraries ctypes ctypes-foreign.base)) | ||
(private_modules ctypes_gc_mutex) | ||
(preprocess (pps bisect_ppx -conditional)) | ||
(implements ctypes-foreign) | ||
(libraries ctypes)) |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
(library | ||
(name ctypes_foreign) | ||
(public_name ctypes-foreign) | ||
;; TODO below needed until https://github.com/ocaml/dune/issues/1724 is resolved | ||
(libraries ctypes-foreign.threaded)) | ||
(wrapped false) | ||
(libraries ctypes-foreign.base) | ||
(virtual_modules foreign)) |
File renamed without changes.
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