Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Root
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
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
为了安全,强烈建议开启2FA双因子认证:User Settings -> Account -> Enable two-factor authentication!!!
Show more breadcrumbs
cxwx
Root
Commits
dcf4119b
Commit
dcf4119b
authored
11 years ago
by
Wim Lavrijsen
Browse files
Options
Downloads
Patches
Plain Diff
Cling workaround: special case to resolve string <-> basic_string<char>
parent
1d3b46cc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bindings/pyroot/src/Converters.cxx
+1
-1
1 addition, 1 deletion
bindings/pyroot/src/Converters.cxx
bindings/pyroot/src/RootWrapper.cxx
+9
-2
9 additions, 2 deletions
bindings/pyroot/src/RootWrapper.cxx
bindings/pyroot/src/TConstructorHolder.cxx
+3
-1
3 additions, 1 deletion
bindings/pyroot/src/TConstructorHolder.cxx
with
13 additions
and
4 deletions
bindings/pyroot/src/Converters.cxx
+
1
−
1
View file @
dcf4119b
...
...
@@ -504,7 +504,7 @@ Bool_t PyROOT::TCStringConverter::SetArg(
// set the value and declare success
if
(
func
)
gInterpreter
->
CallFunc_SetArg
(
func
,
reinterpret_cast
<
Long_t
>
(
fBuffer
.
c_str
()
)
);
gInterpreter
->
CallFunc_SetArg
(
func
,
(
Long_t
)
fBuffer
.
c_str
()
);
return
kTRUE
;
}
...
...
This diff is collapsed.
Click to expand it.
bindings/pyroot/src/RootWrapper.cxx
+
9
−
2
View file @
dcf4119b
...
...
@@ -230,8 +230,15 @@ int PyROOT::BuildRootClassDict( const TScopeAdapter& klass, PyObject* pyclass )
// special case trackers
Bool_t
setupSetItem
=
kFALSE
;
Bool_t
isConstructor
=
TClassEdit
::
ShortType
(
mtName
.
c_str
(),
TClassEdit
::
kDropAlloc
)
==
clName
;
// CLING WORKAROUND --
Bool_t
isConstructor
=
kFALSE
;
if
(
clName
==
"string"
)
{
isConstructor
=
mtName
==
"basic_string<char>"
;
}
else
{
// -- CLING WORKAROUND
isConstructor
=
TClassEdit
::
ShortType
(
mtName
.
c_str
(),
TClassEdit
::
kDropAlloc
)
==
clName
;
}
// filter empty names (happens for namespaces, is bug?)
if
(
mtName
==
""
)
...
...
This diff is collapsed.
Click to expand it.
bindings/pyroot/src/TConstructorHolder.cxx
+
3
−
1
View file @
dcf4119b
...
...
@@ -86,8 +86,10 @@ PyObject* PyROOT::TConstructorHolder::operator()(
// CLING WORKAROUND --
// Due to #100389, the constructor may not be a valid method. This happens if
// there is no (default) contructor, so just return a right-size bit of memory.
if
(
!
address
)
if
(
!
address
)
{
PyErr_Clear
();
address
=
(
Long_t
)
klass
->
New
();
}
// -- END CLING WORKAROUND
// done with filtered args
...
...
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