Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: QuickJSR
Title: Interface for the 'QuickJS' Lightweight 'JavaScript' Engine
Version: 1.6.0
Version: 1.7.0
Authors@R: c(
person(c("Andrew", "R."), "Johnson", , "andrew.johnson@arjohnsonau.com", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-7000-8065")),
Expand All @@ -23,6 +23,6 @@ Encoding: UTF-8
Language: en-AU
NeedsCompilation: yes
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
SystemRequirements: GNU make
VignetteBuilder: knitr
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Generated by roxygen2: do not edit by hand

export(JSContext)
export(cxxflags)
export(from_json)
export(ldflags)
export(qjs_eval)
export(quickjs_version)
export(to_json)
Expand Down
41 changes: 0 additions & 41 deletions R/flags.R

This file was deleted.

4 changes: 2 additions & 2 deletions man/QuickJSR-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 0 additions & 19 deletions man/cxxflags.Rd

This file was deleted.

18 changes: 0 additions & 18 deletions man/ldflags.Rd

This file was deleted.

2 changes: 1 addition & 1 deletion man/quickjs_version.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions src/Makevars
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PKG_CPPFLAGS = -I"../inst/include/" -I"../inst/include/quickjs" -D_GNU_SOURCE
PKG_LIBS = ../inst/lib/$(R_ARCH)/libquickjs.a
PKG_CPPFLAGS = -I"../inst/include/" -I"quickjs" -D_GNU_SOURCE
PKG_LIBS = libquickjs.o

ifeq ($(OS),Windows_NT)
DLL := .dll
Expand Down Expand Up @@ -39,12 +39,12 @@ $(SHLIB): $(OBJECTS)
$(OBJECTS): build-static

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

clean:
$(RM) libquickjs.o $(OBJECTS) QuickJSR$(DLL)
$(RM) libquickjs.o $(OBJECTS)
$(RM) -r ../inst/lib ../inst/include/quickjs
14 changes: 14 additions & 0 deletions src/libquickjs.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#include <stdio.h>

void Rf_error(const char* fmt, ...);

void Rf_abort(void) {
Rf_error("Aborted");
}
void Rf_exit(int status) {
Rf_error("Exited with status %d", status);
}

#define abort Rf_abort
#define exit Rf_exit

#include "quickjs/cutils.c"
#include "quickjs/libbf.c"
#include "quickjs/libregexp.c"
Expand Down
Loading