Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
Ocarina
Commits
e64e28cb
Commit
e64e28cb
authored
Feb 28, 2014
by
yoogx
Browse files
* Separate initialization function for library from the one
for the Ocarina main binary.
parent
60d2922b
Changes
2
Show whitespace changes
Inline
Side-by-side
src/main/ocarina-python_cmd.adb
View file @
e64e28cb
with
GNATCOLL
.
Scripts
;
use
GNATCOLL
.
Scripts
;
with
GNATCOLL
.
Scripts
.
Python
;
use
GNATCOLL
.
Scripts
.
Python
;
with
Ocarina
.
Configuration
;
use
Ocarina
.
Configuration
;
with
Ocarina
.
Utils
;
package
body
Ocarina
.
Python_Cmd
is
...
...
@@ -145,6 +146,28 @@ package body Ocarina.Python_Cmd is
return
Repo
;
end
Register_Scripts_And_Functions
;
--------------------
-- Initialize_Lib --
--------------------
procedure
Initialize_Lib
is
procedure
Adainit
;
pragma
Import
(
C
,
Adainit
,
"adainit"
);
begin
-- Initialize Ada runtime
Adainit
;
-- Initialize Ocarina runtime
Ocarina
.
Initialize
;
Default_AADL_Version
:=
Get_Default_AADL_Version
;
AADL_Version
:=
Ocarina
.
AADL_V2
;
Ocarina
.
Configuration
.
Init_Modules
;
-- Initialize Python bindings
Repo
:=
Register_Scripts_And_Functions
;
end
Initialize_Lib
;
----------------
-- Initialize --
----------------
...
...
src/main/ocarina-python_cmd.ads
View file @
e64e28cb
...
...
@@ -10,8 +10,10 @@ package Ocarina.Python_Cmd is
-- Register the Python scripting language, and the functions we
-- export
procedure
Initialize_Lib
;
pragma
Export
(
C
,
Initialize_Lib
,
"initocarina"
);
procedure
Initialize
;
pragma
Export
(
C
,
Initialize
,
"initocarina"
);
private
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment