From f2e2e77cb6b73d8a2ad0008ca2eb43c0e9363ce2 Mon Sep 17 00:00:00 2001 From: "Paul J. Davis" Date: Wed, 9 Nov 2011 13:41:59 -0600 Subject: [PATCH] Add check for JS script object type --- couchjs/c_src/SConscript | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/couchjs/c_src/SConscript b/couchjs/c_src/SConscript index a5f8b66b..da3752bc 100644 --- a/couchjs/c_src/SConscript +++ b/couchjs/c_src/SConscript @@ -86,6 +86,13 @@ if not env.GetOption('clean'): conf.Define(vsn) break + ## Find the proper type for JS script objects + + if conf.CheckType("JSScript*", '#include "%s"' % jsapi): + conf.Define("JSSCRIPT_TYPE", "JSScript*") + else: + conf.Define("JSSCRIPT_TYPE", "JSObject*") + ## Define properties for -h / -V (_, vsn) = runcmd("git describe --match 1.*")