Commit 5a87d0eb authored by Maxime Perrotin's avatar Maxime Perrotin

Declare the Startup procedure in the .ads

It was declared in the .adb, thus not visible when the module was
imported from an Ada file
parent 0a4f1eef
......@@ -142,6 +142,9 @@ The background pattern was downloaded from www.subtlepatterns.com
Changelog
=========
1.5.23 (12/2016) minor bugfix
- In simulation mode, bugfix in the declaration of the startup function
1.5.22 (12/2016)
- Simulation function save/restore context fix
......
......@@ -316,10 +316,7 @@ LD_LIBRARY_PATH=. opengeode-simulator
start_transition.append(u'runTransition(0);')
start_transition.append(initDone)
else:
start_transition = [u'procedure Startup;',
u'pragma Export(C, Startup, "{}_startup");'
.format(process_name),
u'procedure Startup is',
start_transition = [u'procedure Startup is',
u'begin',
u' runTransition(0);' if process.transitions
else 'null;',
......@@ -406,6 +403,11 @@ package {process_name} is'''.format(process_name=process_name,
dll_api.append("end restore_context;")
dll_api.append("")
# Declare procedure Startup in .ads
ads_template.append(u'procedure Startup;')
ads_template.append(u'pragma Export(C, Startup, "{}_startup");'
.format(process_name))
# interface to get/set state aggregations XXX add to C generator
for substates in aggregates.viewvalues():
for each in substates:
......@@ -419,13 +421,7 @@ package {process_name} is'''.format(process_name=process_name,
# Functions to get gobal variables (length and value)
for var_name, (var_type, _) in process.variables.viewitems():
# Getters for local variables
# Removed size - this was needed by swig only, not ctypes
# process_level_decl.append("function l_{name}_size return integer "
# "is ({prefix}.{name}'Size/8) with Export,"
# " Convention => C,"
# ' Link_Name => "{name}_size";'
# .format(prefix=LPREFIX, name=var_name))
# Getters for external applications to view local variables via dll
process_level_decl.append("function l_{name}_value"
" return access {sort} "
"is ({prefix}.{name}'access) with Export,"
......
......@@ -138,7 +138,7 @@ except ImportError:
__all__ = ['opengeode', 'SDL_Scene', 'SDL_View', 'parse']
__version__ = '1.5.22'
__version__ = '1.5.23'
if hasattr(sys, 'frozen'):
# Detect if we are running on Windows (py2exe-generated)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment