Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
asapo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Joao Alvim Oliveira Dias De Almeida
asapo
Commits
6349451c
Commit
6349451c
authored
3 years ago
by
Juergen Hannappel
Browse files
Options
Downloads
Patches
Plain Diff
add function to create a aspao-string from a c string
parent
2aa9bf48
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
common/cpp/include/asapo/common/common_c.h
+1
-0
1 addition, 0 deletions
common/cpp/include/asapo/common/common_c.h
common/cpp/src/common/common_c_glue.cpp
+6
-0
6 additions, 0 deletions
common/cpp/src/common/common_c_glue.cpp
with
7 additions
and
0 deletions
common/cpp/include/asapo/common/common_c.h
+
1
−
0
View file @
6349451c
...
@@ -20,6 +20,7 @@ void* asapo_new_handle();
...
@@ -20,6 +20,7 @@ void* asapo_new_handle();
void
asapo_error_explain
(
const
AsapoErrorHandle
error
,
char
*
buf
,
size_t
max_size
);
void
asapo_error_explain
(
const
AsapoErrorHandle
error
,
char
*
buf
,
size_t
max_size
);
AsapoBool
asapo_is_error
(
AsapoErrorHandle
err
);
AsapoBool
asapo_is_error
(
AsapoErrorHandle
err
);
AsapoStringHandle
asapo_string_create
(
const
char
*
str
);
const
char
*
asapo_string_c_str
(
const
AsapoStringHandle
str
);
const
char
*
asapo_string_c_str
(
const
AsapoStringHandle
str
);
size_t
asapo_string_size
(
const
AsapoStringHandle
str
);
size_t
asapo_string_size
(
const
AsapoStringHandle
str
);
...
...
This diff is collapsed.
Click to expand it.
common/cpp/src/common/common_c_glue.cpp
+
6
−
0
View file @
6349451c
...
@@ -32,6 +32,12 @@ AsapoHandle* handle_or_null(AsapoHandle* handle, AsapoErrorHandle* error, asapo:
...
@@ -32,6 +32,12 @@ AsapoHandle* handle_or_null(AsapoHandle* handle, AsapoErrorHandle* error, asapo:
extern "
C" {
extern "
C" {
AsapoStringHandle
asapo_string_create
(
const
char
*
str
)
{
return
AsapoStringHandle
(
new
std
::
string
(
str
));
}
//! free handle memory, set handle to NULL
//! free handle memory, set handle to NULL
/// \param[in] pointer to an ASAPO handle
/// \param[in] pointer to an ASAPO handle
void
asapo_free_handle
(
void
**
handle
)
{
void
asapo_free_handle
(
void
**
handle
)
{
...
...
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