summaryrefslogtreecommitdiff
path: root/modules/gdnative/SCsub
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdnative/SCsub')
-rw-r--r--modules/gdnative/SCsub8
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/gdnative/SCsub b/modules/gdnative/SCsub
index ff891e6562..6592d0ae1d 100644
--- a/modules/gdnative/SCsub
+++ b/modules/gdnative/SCsub
@@ -74,7 +74,6 @@ def build_gdnative_api_struct(target, source, env):
from collections import OrderedDict
with open(source[0].path, 'r') as fd:
- # Keep the json ordered
api = json.load(fd)
header, source = target
@@ -109,7 +108,7 @@ def _build_gdnative_wrapper_code(api):
for funcdef in api['api']:
args = ', '.join(['%s%s' % (_spaced(t), n) for t, n in funcdef['arguments']])
- out.append('%s %s(%s) {' % (_spaced(funcdef['return_type']), funcdef['name'], args))
+ out.append('%s%s(%s) {' % (_spaced(funcdef['return_type']), funcdef['name'], args))
args = ', '.join(['%s' % n for t, n in funcdef['arguments']])
@@ -132,7 +131,6 @@ def _build_gdnative_wrapper_code(api):
def build_gdnative_wrapper_code(target, source, env):
import json
with open(source[0].path, 'r') as fd:
-#Keep the json ordered
api = json.load(fd)
wrapper_file = target[0]
@@ -143,7 +141,7 @@ def build_gdnative_wrapper_code(target, source, env):
if ARGUMENTS.get('gdnative_wrapper', False):
#build wrapper code
- gdn_env.Command('gdnative_wrapper_code.gen.cpp', 'gdnative_api.json', build_gdnative_wrapper_code)
+ gensource, = gdn_env.Command('gdnative_wrapper_code.gen.cpp', 'gdnative_api.json', build_gdnative_wrapper_code)
gd_wrapper_env = env.Clone()
gd_wrapper_env.Append(CPPPATH=['#modules/gdnative/include/'])
@@ -151,4 +149,4 @@ if ARGUMENTS.get('gdnative_wrapper', False):
# I think this doesn't work on MSVC yet...
gd_wrapper_env.Append(CCFLAGS=['-fPIC'])
- gd_wrapper_env.Library("#bin/gdnative_wrapper_code", ["#modules/gdnative/gdnative_wrapper_code.gen.cpp"])
+ gd_wrapper_env.Library("#bin/gdnative_wrapper_code", [gensource])