Skip to content

Commit 8b8dd22

Browse files
authored
Merge pull request #83 from andrjohns/compiled-warnings
No longer bundle static lib due to CRAN warnings
2 parents e166ffc + 694be5a commit 8b8dd22

File tree

9 files changed

+26
-92
lines changed

9 files changed

+26
-92
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: QuickJSR
22
Title: Interface for the 'QuickJS' Lightweight 'JavaScript' Engine
3-
Version: 1.6.0
3+
Version: 1.7.0
44
Authors@R: c(
55
person(c("Andrew", "R."), "Johnson", , "andrew.johnson@arjohnsonau.com", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0001-7000-8065")),
@@ -23,6 +23,6 @@ Encoding: UTF-8
2323
Language: en-AU
2424
NeedsCompilation: yes
2525
Roxygen: list(markdown = TRUE)
26-
RoxygenNote: 7.3.1
26+
RoxygenNote: 7.3.2
2727
SystemRequirements: GNU make
2828
VignetteBuilder: knitr

NAMESPACE

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
# Generated by roxygen2: do not edit by hand
22

33
export(JSContext)
4-
export(cxxflags)
54
export(from_json)
6-
export(ldflags)
75
export(qjs_eval)
86
export(quickjs_version)
97
export(to_json)

R/flags.R

Lines changed: 0 additions & 41 deletions
This file was deleted.

man/QuickJSR-package.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/cxxflags.Rd

Lines changed: 0 additions & 19 deletions
This file was deleted.

man/ldflags.Rd

Lines changed: 0 additions & 18 deletions
This file was deleted.

man/quickjs_version.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Makevars

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
PKG_CPPFLAGS = -I"../inst/include/" -I"../inst/include/quickjs" -D_GNU_SOURCE
2-
PKG_LIBS = ../inst/lib/$(R_ARCH)/libquickjs.a
1+
PKG_CPPFLAGS = -I"../inst/include/" -I"quickjs" -D_GNU_SOURCE
2+
PKG_LIBS = libquickjs.o
33

44
ifeq ($(OS),Windows_NT)
55
DLL := .dll
@@ -39,12 +39,12 @@ $(SHLIB): $(OBJECTS)
3939
$(OBJECTS): build-static
4040

4141
build-static:
42-
@mkdir -p ../inst/include/quickjs
43-
@cp $(wildcard quickjs/*.h) ../inst/include/quickjs
42+
# @mkdir -p ../inst/include/quickjs
43+
# @cp $(wildcard quickjs/*.h) ../inst/include/quickjs
4444
$(R_CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -funsigned-char -std=gnu11 -c libquickjs.c
45-
@mkdir -p ../inst/lib/$(R_ARCH)
46-
$(AR) -rs ../inst/lib/$(R_ARCH)/libquickjs.a libquickjs.o
45+
# @mkdir -p ../inst/lib/$(R_ARCH)
46+
# $(AR) -rs ../inst/lib/$(R_ARCH)/libquickjs.a libquickjs.o
4747

4848
clean:
49-
$(RM) libquickjs.o $(OBJECTS) QuickJSR$(DLL)
49+
$(RM) libquickjs.o $(OBJECTS)
5050
$(RM) -r ../inst/lib ../inst/include/quickjs

src/libquickjs.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
#include <stdio.h>
2+
3+
void Rf_error(const char* fmt, ...);
4+
5+
void Rf_abort(void) {
6+
Rf_error("Aborted");
7+
}
8+
void Rf_exit(int status) {
9+
Rf_error("Exited with status %d", status);
10+
}
11+
12+
#define abort Rf_abort
13+
#define exit Rf_exit
14+
115
#include "quickjs/cutils.c"
216
#include "quickjs/libbf.c"
317
#include "quickjs/libregexp.c"

0 commit comments

Comments
 (0)