mirror of
https://github.com/opencv/opencv.git
synced 2026-07-28 23:03:03 +04:00
Merge pull request #17436 from vpisarev:fix_python_io
* fixed #17044 1. fixed Python part of the tutorial about using OpenCV XML-YAML-JSON I/O functionality from C++ and Python. 2. added startWriteStruct() and endWriteStruct() methods to FileStorage 3. modifed FileStorage::write() methods to make them work well inside sequences, not only mappings. * try to fix the doc builder * added Python regression test for FileStorage I/O API ([TODO] iterating through long sequences can be very slow) * fixed yaml testing
This commit is contained in:
@@ -853,7 +853,7 @@ void icvXMLWriteScalar( CvFileStorage* fs, const char* key, const char* data, in
|
||||
char* ptr = fs->buffer;
|
||||
int new_offset = (int)(ptr - fs->buffer_start) + len;
|
||||
|
||||
if( key )
|
||||
if( key && key[0] != '\0' )
|
||||
CV_Error( CV_StsBadArg, "elements with keys can not be written to sequence" );
|
||||
|
||||
fs->struct_flags = CV_NODE_SEQ;
|
||||
|
||||
Reference in New Issue
Block a user