Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency on cpp-jsonnet submodule from C bindings #482

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 1 addition & 4 deletions c-bindings/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ go_library(
"internal.h",
"libjsonnet.cpp",
],
cdeps = [
"@cpp_jsonnet//include:libjsonnet",
],
cgo = True,
copts = ["-Wall -Icpp-jsonnet/include"], # keep
copts = ["-Wall"], # keep
cxxopts = ["-std=c++11"],
importpath = "github.com/google/go-jsonnet/c-bindings",
visibility = ["//visibility:private"],
Expand Down
2 changes: 1 addition & 1 deletion c-bindings/c-bindings.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/google/go-jsonnet"
"github.com/google/go-jsonnet/ast"

// #cgo CXXFLAGS: -std=c++11 -Wall -I../cpp-jsonnet/include
// #cgo CXXFLAGS: -std=c++11 -Wall
// #include "internal.h"
"C"
)
Expand Down
5 changes: 4 additions & 1 deletion c-bindings/libjsonnet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
#include <stdlib.h>

extern "C" {
#include "libjsonnet.h"
void jsonnet_gc_min_objects(struct JsonnetVm *vm, unsigned v);
void jsonnet_gc_growth_trigger(struct JsonnetVm *vm, double v);
char *jsonnet_realloc(JsonnetVm *vm, char *str, size_t sz);

#include "internal.h"
}

Expand Down