Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
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
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
mlz
BornAgain
Commits
791437d9
Commit
791437d9
authored
1 year ago
by
AlQuemist
Committed by
Wuttke, Joachim
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
PyObjectPtr: Minor improvements
parent
ca8eb9e4
No related branches found
Branches containing commit
No related tags found
1 merge request
!1636
PyCore: Re-implementation of embedded Python as a separate module (Major change)
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
PyCore/Embed/PyObjectPtr.cpp
+1
-2
1 addition, 2 deletions
PyCore/Embed/PyObjectPtr.cpp
PyCore/Embed/PyObjectPtr.h
+2
-8
2 additions, 8 deletions
PyCore/Embed/PyObjectPtr.h
with
3 additions
and
10 deletions
PyCore/Embed/PyObjectPtr.cpp
+
1
−
2
View file @
791437d9
#include
"PyObjectPtr.h"
#include
"PyObjectPtr.h"
#include
"PythonInterpreter.h"
#include
"PythonInterpreter.h"
#include
<exception>
// runtime_error
#include
<stdexcept>
// runtime_error
#include
<sstream>
// stringstream
#include
<string>
#include
<string>
...
...
This diff is collapsed.
Click to expand it.
PyCore/Embed/PyObjectPtr.h
+
2
−
8
View file @
791437d9
...
@@ -45,19 +45,13 @@ public:
...
@@ -45,19 +45,13 @@ public:
Status
status
;
Status
status
;
PyObjectPtr
(
PyObject
*
pyobject_ptr
,
const
Status
&
status
);
PyObjectPtr
(
PyObject
*
pyobject_ptr
,
const
Status
&
status
);
PyObjectPtr
(
PyObject
*
pyobject_ptr
);
PyObjectPtr
(
PyObject
*
pyobject_ptr
);
PyObjectPtr
(
const
Status
&
status
);
PyObjectPtr
(
const
Status
&
status
);
~
PyObjectPtr
();
~
PyObjectPtr
();
// disallow copy constructor
PyObjectPtr
(
const
PyObjectPtr
&
)
=
delete
;
PyObjectPtr
(
const
PyObjectPtr
&
)
=
delete
;
// disallow copy assignment
PyObjectPtr
&
operator
=
(
const
PyObjectPtr
&
)
=
delete
;
// allow move constructor
PyObjectPtr
(
PyObjectPtr
&&
other
);
PyObjectPtr
(
PyObjectPtr
&&
other
);
PyObjectPtr
&
operator
=
(
const
PyObjectPtr
&
)
=
delete
;
// reset the container to the initial status (does _not_ release the Python resource)
// reset the container to the initial status (does _not_ release the Python resource)
void
reset
();
void
reset
();
// reset the container to the initial status and return the PyObject pointer (does _not_ release
// reset the container to the initial status and return the PyObject pointer (does _not_ release
...
...
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