Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
binary_c-python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Izzard, Robert Dr (Maths & Physics)
binary_c-python
Commits
f96c7d41
Commit
f96c7d41
authored
4 years ago
by
David Hendriks
Browse files
Options
Downloads
Patches
Plain Diff
updated api function to get the persistent_data memory addr
parent
81f25787
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/binary_c_python_api.c
+4
-3
4 additions, 3 deletions
src/binary_c_python_api.c
with
4 additions
and
3 deletions
src/binary_c_python_api.c
+
4
−
3
View file @
f96c7d41
...
...
@@ -399,7 +399,7 @@ long int return_persistent_data_memaddr(char * argstring,
struct
libbinary_c_stardata_t
*
stardata
=
NULL
;
struct
libbinary_c_store_t
*
store
=
NULL
;
struct
libbinary_c_persistent_data_t
*
persistent_data
=
NULL
;
// TODO: change persistent_data_t to libbinary_c_persistent_data_t
struct
libbinary_c_persistent_data_t
*
persistent_data
=
NULL
;
/* make new stardata */
stardata
=
NULL
;
...
...
@@ -419,9 +419,10 @@ long int return_persistent_data_memaddr(char * argstring,
binary_c_error_buffer
(
stardata
,
error_buffer
);
/* convert the pointer */
uintptr_t
persistent_data_memaddr_int
=
(
uintptr_t
)
persistent_data
;
// C Version converting ptr to int
printf
(
"persistent_data is at address: %p
\n
"
,
(
void
*
)
&
persistent_data
);
uintptr_t
persistent_data_memaddr_int
=
(
uintptr_t
)
stardata
->
persistent_data
;
// C Version converting ptr to int
printf
(
"persistent_data is at address: %p
\n
"
,
(
void
*
)
stardata
->
persistent_data
);
printf
(
"persistent_data_memaddr_int: %lu
\n
"
,
persistent_data_memaddr_int
);
/* free stardata (except the buffer) */
binary_c_free_memory
(
&
stardata
,
// Stardata
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment