Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
bbae0541
Commit
bbae0541
authored
Mar 21, 2013
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #682 from vpisarev/python_str_fix
repaired std::string handling
parents
2d764fe1
4e1619d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
cv2.cpp
modules/python/src2/cv2.cpp
+2
-0
gen2.py
modules/python/src2/gen2.py
+2
-3
No files found.
modules/python/src2/cv2.cpp
View file @
bbae0541
...
@@ -100,6 +100,8 @@ catch (const cv::Exception &e) \
...
@@ -100,6 +100,8 @@ catch (const cv::Exception &e) \
using
namespace
cv
;
using
namespace
cv
;
typedef
cv
::
softcascade
::
ChannelFeatureBuilder
softcascade_ChannelFeatureBuilder
;
typedef
cv
::
softcascade
::
ChannelFeatureBuilder
softcascade_ChannelFeatureBuilder
;
typedef
std
::
string
string
;
typedef
std
::
vector
<
uchar
>
vector_uchar
;
typedef
std
::
vector
<
uchar
>
vector_uchar
;
typedef
std
::
vector
<
int
>
vector_int
;
typedef
std
::
vector
<
int
>
vector_int
;
typedef
std
::
vector
<
float
>
vector_float
;
typedef
std
::
vector
<
float
>
vector_float
;
...
...
modules/python/src2/gen2.py
View file @
bbae0541
...
@@ -214,8 +214,7 @@ simple_argtype_mapping = {
...
@@ -214,8 +214,7 @@ simple_argtype_mapping = {
"int"
:
(
"int"
,
"i"
,
"0"
),
"int"
:
(
"int"
,
"i"
,
"0"
),
"float"
:
(
"float"
,
"f"
,
"0.f"
),
"float"
:
(
"float"
,
"f"
,
"0.f"
),
"double"
:
(
"double"
,
"d"
,
"0"
),
"double"
:
(
"double"
,
"d"
,
"0"
),
"c_string"
:
(
"char*"
,
"s"
,
'(char*)""'
),
"c_string"
:
(
"char*"
,
"s"
,
'(char*)""'
)
"string"
:
(
"std::string"
,
"s"
,
None
)
}
}
def
normalize_class_name
(
name
):
def
normalize_class_name
(
name
):
...
@@ -571,7 +570,7 @@ class FuncInfo(object):
...
@@ -571,7 +570,7 @@ class FuncInfo(object):
else
:
else
:
code_fcall
=
"ERRWRAP2( "
code_fcall
=
"ERRWRAP2( "
if
v
.
rettype
:
if
v
.
rettype
:
code_decl
+=
" "
+
simple_argtype_mapping
.
get
(
v
.
rettype
,
(
v
.
rettype
,
None
,
None
))[
0
]
+
" retval;
\n
"
code_decl
+=
" "
+
v
.
rettype
+
" retval;
\n
"
code_fcall
+=
"retval = "
code_fcall
+=
"retval = "
if
ismethod
:
if
ismethod
:
code_fcall
+=
"_self_->"
+
self
.
cname
code_fcall
+=
"_self_->"
+
self
.
cname
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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