mirror of
https://github.com/janet-lang/janet
synced 2025-02-02 10:19:10 +00:00
Add declare-headers to jpm.
This commit is contained in:
parent
612eaff9ff
commit
7b7d742bec
@ -2,6 +2,8 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
## Unreleased - ???
|
## Unreleased - ???
|
||||||
|
- Add `declare-headers` to jpm.
|
||||||
|
- Fix error using unix pipes on BSDs.
|
||||||
- Support .cc and .cxx extensions in `jpm` for C++ code.
|
- Support .cc and .cxx extensions in `jpm` for C++ code.
|
||||||
- Change networking code to not create as many HUP errors.
|
- Change networking code to not create as many HUP errors.
|
||||||
- Add `net/shutdown` to close sockets in one direction without hang ups.
|
- Add `net/shutdown` to close sockets in one direction without hang ups.
|
||||||
|
12
jpm
12
jpm
@ -452,6 +452,7 @@
|
|||||||
[opts]
|
[opts]
|
||||||
@[;(opt opts :cflags default-cflags)
|
@[;(opt opts :cflags default-cflags)
|
||||||
(string "-I" (dyn :headerpath JANET_HEADERPATH))
|
(string "-I" (dyn :headerpath JANET_HEADERPATH))
|
||||||
|
(string "-I" (dyn :modpath JANET_MODPATH))
|
||||||
(string "-O" (opt opts :optimize 2))])
|
(string "-O" (opt opts :optimize 2))])
|
||||||
|
|
||||||
(defn- getcppflags
|
(defn- getcppflags
|
||||||
@ -459,6 +460,7 @@
|
|||||||
[opts]
|
[opts]
|
||||||
@[;(opt opts :cppflags default-cppflags)
|
@[;(opt opts :cppflags default-cppflags)
|
||||||
(string "-I" (dyn :headerpath JANET_HEADERPATH))
|
(string "-I" (dyn :headerpath JANET_HEADERPATH))
|
||||||
|
(string "-I" (dyn :modpath JANET_MODPATH))
|
||||||
(string "-O" (opt opts :optimize 2))])
|
(string "-O" (opt opts :optimize 2))])
|
||||||
|
|
||||||
(defn- entry-name
|
(defn- entry-name
|
||||||
@ -1053,6 +1055,16 @@ int main(int argc, const char **argv) {
|
|||||||
(each s sources
|
(each s sources
|
||||||
(install-rule s path))))
|
(install-rule s path))))
|
||||||
|
|
||||||
|
(defn declare-headers
|
||||||
|
"Declare headers for a library installation. Installed headers can be used by other native
|
||||||
|
libraries."
|
||||||
|
[&keys {:headers headers :prefix prefix}]
|
||||||
|
(def path (string (dyn :modpath JANET_MODPATH) (or prefix "")))
|
||||||
|
(if (bytes? headers)
|
||||||
|
(install-rule headers path)
|
||||||
|
(each h headers
|
||||||
|
(install-rule h path))))
|
||||||
|
|
||||||
(defn declare-bin
|
(defn declare-bin
|
||||||
"Declare a generic file to be installed as an executable."
|
"Declare a generic file to be installed as an executable."
|
||||||
[&keys {:main main}]
|
[&keys {:main main}]
|
||||||
|
@ -617,7 +617,7 @@ static void janet_pretty_one(struct pretty *S, Janet x, int is_dict_value) {
|
|||||||
if (mincap >= INT32_MAX / 2) {
|
if (mincap >= INT32_MAX / 2) {
|
||||||
S->keysort_capacity = INT32_MAX;
|
S->keysort_capacity = INT32_MAX;
|
||||||
} else {
|
} else {
|
||||||
S->keysort_capacity = (int32_t) (mincap * 2);
|
S->keysort_capacity = (int32_t)(mincap * 2);
|
||||||
}
|
}
|
||||||
S->keysort_buffer = janet_srealloc(S->keysort_buffer, sizeof(int32_t) * S->keysort_capacity);
|
S->keysort_buffer = janet_srealloc(S->keysort_buffer, sizeof(int32_t) * S->keysort_capacity);
|
||||||
if (NULL == S->keysort_buffer) {
|
if (NULL == S->keysort_buffer) {
|
||||||
|
Loading…
Reference in New Issue
Block a user