Skip to content

Commit

Permalink
Minor change to previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
thesamovar authored and thesamovar committed Aug 30, 2013
1 parent d7d7c84 commit 531f3fe
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions dev/ideas/devices/cpp_standalone.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,9 @@ def freeze(code, ns):

for codeobj in code_objects:
ns = codeobj.namespace
# TODO: fix this hack
# Surprise, surprise. Using global variables like this in C++ doesn't work. That's OK, this was
# only ever a temporary hack anyway. You can manually modify the codeobject.cpp files to move
# these definitions into the function, and then it works! Hurrah!
# TODO: fix these freeze/CONSTANTS hacks somehow - they work but not elegant.
code = freeze(codeobj.code.cpp_file, ns)
code = code.replace('%CONSTANTS%', '\n'.join(code_object_defs[codeobj]))
#code = '\n'.join(code_object_defs[codeobj])+code
code = '#include "arrays.h"\n'+code

open('output/'+codeobj.name+'.cpp', 'w').write(code)
Expand Down

0 comments on commit 531f3fe

Please sign in to comment.