libtabula

Check-in [4e189f92a7]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Merged trunk changes in
Timelines: family | ancestors | descendants | both | row-pimpl
Files: files | file ages | folders
SHA1:4e189f92a71ac1c275a8a4a421aecb7346669661
User & Date: tangent 2015-08-15 09:32:58
Context
2015-08-15
09:35
Merged row-pimpl branch into trunk: moves one of the last few remaining MySQLisms on the trunk down into the MySQLDBDriver layer. check-in: be382a7009 user: tangent tags: trunk
09:32
Merged trunk changes in Closed-Leaf check-in: 4e189f92a7 user: tangent tags: row-pimpl
09:24
Removed a FIXME comment: its proposed "fix" doesn't work. check-in: 381f8225d9 user: tangent tags: row-pimpl
09:21
The crash that prompted the creation of the row-pimpl branch was due to calling Row.size() before Row was initialized. This old MYSQL_ROW base implementation copes with this, but the new branch will try to dereference a null pointer to its nonexistent implementation object. Guarding this and a few other paths so we don't try to use that smart pointer if we aren't initialized yet.

(This change should have been made on the row-pimpl branch, but it also works against trunk, where it amounts to belt-and-suspenders.) check-in: bd141d86c6 user: tangent tags: trunk

Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to HACKERS.md.

110
111
112
113
114
115
116










117
118
119
120
121
122
123
You may prefer parallel build and source trees to the above nested
scheme.  This works as you would expect:

    $ mkdir ../build
    $ cd ../build
    $ cmake ../trunk












On Manipulating the Build System Source Files
----

The [CMake build system][4] files are called `CMakeLists.txt`, of
which there are several in the libtabula tree.  These files in turn
depend on files in the `modules` directory off the top level of the







>
>
>
>
>
>
>
>
>
>







110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
You may prefer parallel build and source trees to the above nested
scheme.  This works as you would expect:

    $ mkdir ../build
    $ cd ../build
    $ cmake ../trunk


Debug Builds
----

By default, CMake creates a release build on Unixy systems, which means
you don't get debugging symbols in the resulting binaries.  To enable a
debug build, change the "cmake .." command above to:

     $ cmake -DCMAKE_BUILD_TYPE=Debug ..


On Manipulating the Build System Source Files
----

The [CMake build system][4] files are called `CMakeLists.txt`, of
which there are several in the libtabula tree.  These files in turn
depend on files in the `modules` directory off the top level of the

Changes to src/row.h.

301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
...
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
	size_type field_num(const char* name) const;

	/// \brief Get a reference to the first element of the vector
	const_reference front() const { return data_->front(); }

	/// \brief Return maximum number of elements that can be stored
	/// in container without resizing.
	size_type max_size() const { return data_->max_size(); }

	/// \brief Assignment operator
	Row& operator =(const Row& rhs);

	/// \brief Get the value of a field given its name.
	///
	/// If the field does not exist in this row, we throw a BadFieldName
................................................................................
	///           // Retreived another row in the result set, can use 'row'
	///       }
	///   }
	/// \endcode
	///
	operator private_bool_type() const
	{
		return data_->size() && initialized_ ? &Row::initialized_ : 0;
	}

	/// \brief Return reverse iterator pointing to first element in the
	/// container
	const_reverse_iterator rbegin() const { return data_->rbegin(); }

	/// \brief Return reverse iterator pointing to one past the last
	/// element in the container
	const_reverse_iterator rend() const { return data_->rend(); }

	/// \brief Get the number of fields in the row.
	size_type size() const { return data_->size(); }

	/// \brief Get a list of the values in this row
	///
	/// When inserted into a C++ stream, the delimiter 'd' will be used
	/// between the items, and the quoting and escaping rules will be
	/// set by the manipulator 'm' you choose.
	///







|







 







|











|







301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
...
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
	size_type field_num(const char* name) const;

	/// \brief Get a reference to the first element of the vector
	const_reference front() const { return data_->front(); }

	/// \brief Return maximum number of elements that can be stored
	/// in container without resizing.
	size_type max_size() const { return initialized_ ? data_.max_size() : 0; }

	/// \brief Assignment operator
	Row& operator =(const Row& rhs);

	/// \brief Get the value of a field given its name.
	///
	/// If the field does not exist in this row, we throw a BadFieldName
................................................................................
	///           // Retreived another row in the result set, can use 'row'
	///       }
	///   }
	/// \endcode
	///
	operator private_bool_type() const
	{
		return initialized_ && data_.size() ? &Row::initialized_ : 0;
	}

	/// \brief Return reverse iterator pointing to first element in the
	/// container
	const_reverse_iterator rbegin() const { return data_->rbegin(); }

	/// \brief Return reverse iterator pointing to one past the last
	/// element in the container
	const_reverse_iterator rend() const { return data_->rend(); }

	/// \brief Get the number of fields in the row.
	size_type size() const { return initialized_ ? data_.size() : 0; }

	/// \brief Get a list of the values in this row
	///
	/// When inserted into a C++ stream, the delimiter 'd' will be used
	/// between the items, and the quoting and escaping rules will be
	/// set by the manipulator 'm' you choose.
	///